If I have a view of versioned data how do i get the view to return data before the feature class it references is reconciled with the default version of the geodatabase?
You need to be set the version that you want to see in the view; Read versioned data in SQL Server using versioned views—Help | ArcGIS Desktop
That should get you what you want.
I am able to do that in a ssms query window, but the view I created always reads from default. I would like to be able to specify which version of the geodatabase the view reads from. Thanks.
You need to create a view in SSMS and put that SQL to change the version in the view.
I used this to create the view:
<SPAN class="keyword token">USE</SPAN> <SPAN class="punctuation token">[</SPAN>Our <SPAN class="keyword token">Database</SPAN><SPAN class="punctuation token">]</SPAN> GO <SPAN class="keyword token">EXEC</SPAN> <SPAN class="keyword token">database</SPAN><SPAN class="punctuation token">.</SPAN>sde<SPAN class="punctuation token">.</SPAN>set_current_version <SPAN class="string token">'the version'</SPAN> <SPAN class="comment token">/****** view info******/</SPAN> <SPAN class="keyword token">SET</SPAN> ANSI_NULLS <SPAN class="keyword token">ON</SPAN> GO <SPAN class="keyword token">SET</SPAN> QUOTED_IDENTIFIER <SPAN class="keyword token">ON</SPAN> GO<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
but when I script out the view to a new query window, the exec is not there:
<SPAN class="keyword token">USE</SPAN> <SPAN class="punctuation token">[</SPAN>Our <SPAN class="keyword token">Database</SPAN><SPAN class="punctuation token">]</SPAN> GO <SPAN class="comment token">/****** view info******/</SPAN> <SPAN class="keyword token">SET</SPAN> ANSI_NULLS <SPAN class="keyword token">ON</SPAN> GO <SPAN class="keyword token">SET</SPAN> QUOTED_IDENTIFIER <SPAN class="keyword token">ON</SPAN> GO<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
is there something else I need to do?
Thanks.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.