<?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>idea Support correlated subqueries in file geodatabase SQL expressions in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idi-p/1238551</link>
    <description>&lt;P&gt;Could FGDB SQL be enhanced to support correlated subqueries?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example:&amp;nbsp;&lt;/SPAN&gt;Using an SQL expression in the Select by Attributes tool, I want to select the &lt;I&gt;greatest 1 per group&lt;/I&gt;.&lt;/P&gt;&lt;PRE&gt;NOT EXISTS (
        SELECT *
        FROM road_insp r2
        WHERE r2.asset_id = road_insp.asset_id AND r2.date_ &amp;gt; road_insp.date_
       )&lt;BR /&gt;--Demo:  &lt;A href="https://dbfiddle.uk/gSGjLTCW" target="_blank" rel="noopener"&gt;https://dbfiddle.uk/gSGjLTCW&lt;/A&gt; &lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;The above SQL expression would work as expected in mobile GDBs and enterprise GDBs. But in file GDBs, it would select all rows in&amp;nbsp;the table, which would be incorrect.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;It’s important to note that the query fails &lt;/SPAN&gt;&lt;I&gt;silently&lt;/I&gt;&lt;SPAN&gt;, producing incorrect results, rather than throwing an useful error. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Related: &lt;A href="https://community.esri.com/t5/data-management-ideas/clarify-the-docs-correlated-subqueries-not/idi-p/1239429" target="_self"&gt;Clarify the docs: Correlated subqueries not supported in FGDB SQL expressions&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could FGDB SQL be enhanced to support correlated subqueries?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Jan 2024 07:38:28 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-01-15T07:38:28Z</dc:date>
    <item>
      <title>Support correlated subqueries in file geodatabase SQL expressions</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idi-p/1238551</link>
      <description>&lt;P&gt;Could FGDB SQL be enhanced to support correlated subqueries?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example:&amp;nbsp;&lt;/SPAN&gt;Using an SQL expression in the Select by Attributes tool, I want to select the &lt;I&gt;greatest 1 per group&lt;/I&gt;.&lt;/P&gt;&lt;PRE&gt;NOT EXISTS (
        SELECT *
        FROM road_insp r2
        WHERE r2.asset_id = road_insp.asset_id AND r2.date_ &amp;gt; road_insp.date_
       )&lt;BR /&gt;--Demo:  &lt;A href="https://dbfiddle.uk/gSGjLTCW" target="_blank" rel="noopener"&gt;https://dbfiddle.uk/gSGjLTCW&lt;/A&gt; &lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;The above SQL expression would work as expected in mobile GDBs and enterprise GDBs. But in file GDBs, it would select all rows in&amp;nbsp;the table, which would be incorrect.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;It’s important to note that the query fails &lt;/SPAN&gt;&lt;I&gt;silently&lt;/I&gt;&lt;SPAN&gt;, producing incorrect results, rather than throwing an useful error. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Related: &lt;A href="https://community.esri.com/t5/data-management-ideas/clarify-the-docs-correlated-subqueries-not/idi-p/1239429" target="_self"&gt;Clarify the docs: Correlated subqueries not supported in FGDB SQL expressions&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could FGDB SQL be enhanced to support correlated subqueries?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 07:38:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idi-p/1238551</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-15T07:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: FGDB SQL: Support self-correlated subqueries (inner join on a virtual table)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1238950#M22448</link>
      <description>&lt;P&gt;After years, more than a decade, of Esri not really responding to requests to improve SQL support and documentation of SQL support for file geodatabases, I would not be holding one's breath.&amp;nbsp; Now that mobile geodatabases are getting more support across ArcGIS product lines, I am using them more and more.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 22:42:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1238950#M22448</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2022-12-07T22:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: FGDB SQL: Support self-correlated subqueries (inner join on a virtual table)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1239006#M22450</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1371"&gt;@JoshuaBixby&lt;/a&gt;&amp;nbsp;@Do you find there’s functionality that’s lacking in mobile geodatabases that fgdbs supported?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 03:10:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1239006#M22450</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-12-08T03:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: FGDB SQL: Support self-correlated subqueries (inner join on a virtual table)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1239166#M22462</link>
      <description>&lt;P&gt;Regarding your question, yes, but the answer is slowly changing to, no.&amp;nbsp; Not all ArcGIS products&amp;nbsp; support mobile geodatabases and some only support a limited subset of functionality with mobile geodatabases.&amp;nbsp; ArcGIS Desktop/ArcMap is a good example with its very limited support for mobile geodatabases.&amp;nbsp; Over time older products like ArcGIS Desktop/ArcMap will be retired and most new ArcGIS products or versions are supporting more functionality with mobile geodatabases.&amp;nbsp; In the end, I suspect file geodatabases will always perform better than mobile geodatabases, but mobile geodatabases offer much better SQL support, so one will have to weigh the tradeoffs when deciding.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 15:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1239166#M22462</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2022-12-08T15:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Support correlated subqueries in file geodatabase SQL expressions</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1262211#M23470</link>
      <description>&lt;P&gt;BUG-000156143 - An SQL query containing the EXISTS predicate validates successfully but returns incorrect results from a file geodatabase.&lt;BR /&gt;&lt;BR /&gt;ENH-000156158 -&amp;nbsp;Raise exception when using unsupported SQL expressions in file geodatabases.&lt;/P&gt;&lt;P&gt;Esri Canada Case 03264937 -&amp;nbsp;Exception not raised when unsupported FGDB SQL used (correlated subquery)&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 23:31:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1262211#M23470</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-02-27T23:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: Support correlated subqueries in file geodatabase SQL expressions</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1369037#M27971</link>
      <description>&lt;P&gt;Here’s an example use case where a FGDB correlated subquery might have saved the day:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/selecting-the-most-recent-records-based-on-unique/td-p/1365493/page/2" target="_self"&gt;Selecting the most recent records based on unique values in another field&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 17:37:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-correlated-subqueries-in-file-geodatabase/idc-p/1369037#M27971</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-11T17:37:59Z</dc:date>
    </item>
  </channel>
</rss>

