<?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 Sort in subquery in mssql 2005 in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/sort-in-subquery-in-mssql-2005/m-p/447781#M17316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm trying to import some data from another mssql 2005 database into my arcsde 10. I've created some python script to import that data. But now I must solve problem, which is:&lt;/P&gt;&lt;P&gt;- in ms sql server managment studio I've connected to that db, created sql query which is:&lt;/P&gt;&lt;P&gt;SELECT TOP 200 * FROM [envisql].[dbo].[sometable] WHERE [point]=100 ORDER BY [date] DESC&lt;/P&gt;&lt;P&gt;and it works fine.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I've connected whrough ODBC to mentioned db, then 'I've added that table to arcmap. Now when I want to show mentioned above records, I'm using definition filter like:&lt;/P&gt;&lt;P&gt;date IN (SELECT TOP 200 [date] FROM [envisql].[dbo].[sometable] WHERE [point]=100 ORDER BY [date] DESC)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works, but it doesn't show me 200 records but ie. ~500 and not where point=100.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Sep 2014 15:27:23 GMT</pubDate>
    <dc:creator>PiotrSkworzec</dc:creator>
    <dc:date>2014-09-15T15:27:23Z</dc:date>
    <item>
      <title>Sort in subquery in mssql 2005</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/sort-in-subquery-in-mssql-2005/m-p/447781#M17316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm trying to import some data from another mssql 2005 database into my arcsde 10. I've created some python script to import that data. But now I must solve problem, which is:&lt;/P&gt;&lt;P&gt;- in ms sql server managment studio I've connected to that db, created sql query which is:&lt;/P&gt;&lt;P&gt;SELECT TOP 200 * FROM [envisql].[dbo].[sometable] WHERE [point]=100 ORDER BY [date] DESC&lt;/P&gt;&lt;P&gt;and it works fine.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I've connected whrough ODBC to mentioned db, then 'I've added that table to arcmap. Now when I want to show mentioned above records, I'm using definition filter like:&lt;/P&gt;&lt;P&gt;date IN (SELECT TOP 200 [date] FROM [envisql].[dbo].[sometable] WHERE [point]=100 ORDER BY [date] DESC)&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works, but it doesn't show me 200 records but ie. ~500 and not where point=100.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Sep 2014 15:27:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/sort-in-subquery-in-mssql-2005/m-p/447781#M17316</guid>
      <dc:creator>PiotrSkworzec</dc:creator>
      <dc:date>2014-09-15T15:27:23Z</dc:date>
    </item>
  </channel>
</rss>

