<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ArcMap Query Layer results do not match ArcSDE Table or SMSS SDE Table View in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/arcmap-query-layer-results-do-not-match-arcsde/m-p/589696#M33282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working in a versioned database (SQL Server 2012, ArcMap 10.4). When I view the table in ArcMap or Catalog I see 17 rows of data. When I create a query layer based on this table, it returns 15 rows of data AND the data that it returns is old data. Specifically, its returning 1 row of data that has been removed, and is not returning 3 new rows of data that have been created. The table with the correct data is the same database and version that I am creating the query layers against.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct Data: Connected to the database with transaction version 'Edits'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/356842_pastedImage_2.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incorrect Data and Inputs:&lt;/P&gt;&lt;P&gt;Connected to the same database inwhich the properties of that DB are set to point to the 'Edits' version.&lt;/P&gt;&lt;P&gt;NOTE: I have also done the query so that the table name is appended with the view (uusd.dbo.das_antenna_info_evw) and I get the same results. I have also tried creating the query layer by going to File &amp;gt; Add Data &amp;gt; Add Query Layer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/356855_pastedImage_3.png" style="width: 620px; height: 361px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I go into SMSS and query the table view (table_name_evw) I get the correct records back, but if I query table directly I get the incorrect results - the results that I'm getting back with the query layer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/356841_pastedImage_1.png" style="width: 620px; height: 159px;" /&gt;&lt;/P&gt;&lt;P&gt;Whats going on here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jun 2017 15:36:42 GMT</pubDate>
    <dc:creator>RachelAlbritton</dc:creator>
    <dc:date>2017-06-13T15:36:42Z</dc:date>
    <item>
      <title>ArcMap Query Layer results do not match ArcSDE Table or SMSS SDE Table View</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-query-layer-results-do-not-match-arcsde/m-p/589696#M33282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working in a versioned database (SQL Server 2012, ArcMap 10.4). When I view the table in ArcMap or Catalog I see 17 rows of data. When I create a query layer based on this table, it returns 15 rows of data AND the data that it returns is old data. Specifically, its returning 1 row of data that has been removed, and is not returning 3 new rows of data that have been created. The table with the correct data is the same database and version that I am creating the query layers against.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct Data: Connected to the database with transaction version 'Edits'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/356842_pastedImage_2.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Incorrect Data and Inputs:&lt;/P&gt;&lt;P&gt;Connected to the same database inwhich the properties of that DB are set to point to the 'Edits' version.&lt;/P&gt;&lt;P&gt;NOTE: I have also done the query so that the table name is appended with the view (uusd.dbo.das_antenna_info_evw) and I get the same results. I have also tried creating the query layer by going to File &amp;gt; Add Data &amp;gt; Add Query Layer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/356855_pastedImage_3.png" style="width: 620px; height: 361px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I go into SMSS and query the table view (table_name_evw) I get the correct records back, but if I query table directly I get the incorrect results - the results that I'm getting back with the query layer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/356841_pastedImage_1.png" style="width: 620px; height: 159px;" /&gt;&lt;/P&gt;&lt;P&gt;Whats going on here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 15:36:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-query-layer-results-do-not-match-arcsde/m-p/589696#M33282</guid>
      <dc:creator>RachelAlbritton</dc:creator>
      <dc:date>2017-06-13T15:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap Query Layer results do not match ArcSDE Table or SMSS SDE Table View</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-query-layer-results-do-not-match-arcsde/m-p/589697#M33283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you are using Versioned Data, query the Versioned Views for&amp;nbsp;the latest records.&lt;/P&gt;&lt;P&gt;The Base\Business Tables will not have all the recent edits unless you have perform a Compress. The compress moves the recent edits from the Delta Tables (a- &amp;amp; d- Tables) into the Base table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/what-is-a-versioned-view.htm" title="http://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/what-is-a-versioned-view.htm"&gt;What is a versioned view?—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; background-color: #fefefe;"&gt;When you query a versioned view, you can see the data in the base (business) table and the edits that are stored in the delta tables.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 20:13:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-query-layer-results-do-not-match-arcsde/m-p/589697#M33283</guid>
      <dc:creator>Asrujit_SenGupta</dc:creator>
      <dc:date>2017-06-13T20:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap Query Layer results do not match ArcSDE Table or SMSS SDE Table View</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-query-layer-results-do-not-match-arcsde/m-p/589698#M33284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Asrujit - but I was querying the versioned view. Yet the query layer was still creating a layer based on the base table. I've figured out that if I unregister the table as versioned it works but that's starting to creating some other issues when viewing data on AGOL. I'm still problem solving that part of it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 20:32:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-query-layer-results-do-not-match-arcsde/m-p/589698#M33284</guid>
      <dc:creator>RachelAlbritton</dc:creator>
      <dc:date>2017-06-13T20:32:01Z</dc:date>
    </item>
  </channel>
</rss>

