<?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 ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366627#M76975</link>
    <description>&lt;P&gt;&lt;U&gt;Background:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;It's interesting that ArcGIS Pro SQL expressions on &lt;STRONG&gt;Excel&lt;/STRONG&gt; files use &lt;STRONG&gt;SQLite's&lt;/STRONG&gt; SQL dialect, not the ArcGIS SQL dialect. I imagine one could do some pretty useful things with SQLite SQL, even though we're limited to the WHERE clause (as far as I know, we can't write full SQL queries on Excel files using SELECT, FROM, GROUP BY, etc.).&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#:~:text=and%20Excel%20use-,SQLite%20SQL%20dialect,-." target="_self"&gt;SQL reference for query expressions used in ArcGIS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Query expressions in ArcGIS adhere to standard SQL expressions. The SQL syntax you use within an expression differs depending on the data source. Each data source has its own variant of SQL, which are referred to as SQL dialects, such as the following:&lt;/P&gt;&lt;P&gt;...Mobile geodatabases, ST_geometry SQLite, GeoPackage, &lt;STRONG&gt;and Excel use SQLite SQL dialect&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;U&gt;Question:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;How does ArcGIS Pro manage to use SQLite SQL on Excel files? I assume SQLite is not the native SQL dialect for Excel.&lt;/P&gt;&lt;P&gt;Does Pro&amp;nbsp;copy the spreadsheet into a table in memory, and that allows ArcGIS to use SQLite queries on it?&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2024 18:22:26 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-06-12T18:22:26Z</dc:date>
    <item>
      <title>ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366627#M76975</link>
      <description>&lt;P&gt;&lt;U&gt;Background:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;It's interesting that ArcGIS Pro SQL expressions on &lt;STRONG&gt;Excel&lt;/STRONG&gt; files use &lt;STRONG&gt;SQLite's&lt;/STRONG&gt; SQL dialect, not the ArcGIS SQL dialect. I imagine one could do some pretty useful things with SQLite SQL, even though we're limited to the WHERE clause (as far as I know, we can't write full SQL queries on Excel files using SELECT, FROM, GROUP BY, etc.).&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#:~:text=and%20Excel%20use-,SQLite%20SQL%20dialect,-." target="_self"&gt;SQL reference for query expressions used in ArcGIS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Query expressions in ArcGIS adhere to standard SQL expressions. The SQL syntax you use within an expression differs depending on the data source. Each data source has its own variant of SQL, which are referred to as SQL dialects, such as the following:&lt;/P&gt;&lt;P&gt;...Mobile geodatabases, ST_geometry SQLite, GeoPackage, &lt;STRONG&gt;and Excel use SQLite SQL dialect&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;U&gt;Question:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;How does ArcGIS Pro manage to use SQLite SQL on Excel files? I assume SQLite is not the native SQL dialect for Excel.&lt;/P&gt;&lt;P&gt;Does Pro&amp;nbsp;copy the spreadsheet into a table in memory, and that allows ArcGIS to use SQLite queries on it?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2024 18:22:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366627#M76975</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-06-12T18:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366786#M76990</link>
      <description>&lt;P&gt;That documentation has an error, one way or the other.&amp;nbsp; If you copy and paste a bit more of that section:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;BLOCKQUOTE&gt;File-based data, including file geodatabases, shapefiles, in-memory table views, text files such as &lt;SPAN class=""&gt;.dbf&lt;/SPAN&gt;, &lt;SPAN class=""&gt;.csv&lt;/SPAN&gt;, &lt;SPAN class=""&gt;.txt&lt;/SPAN&gt;, &lt;SPAN class=""&gt;.xlsx&lt;/SPAN&gt; tables, and feature services that use standardized queries use the ArcGIS SQL dialect that supports a subset of SQL capabilities.&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;LI&gt;&lt;BLOCKQUOTE&gt;Mobile geodatabases, ST_geometry &lt;SPAN class=""&gt;SQLite&lt;/SPAN&gt;, GeoPackage, and &lt;SPAN class=""&gt;Excel&lt;/SPAN&gt; use &lt;SPAN class=""&gt;SQLite&lt;/SPAN&gt; SQL dialect.&lt;/BLOCKQUOTE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first bullet point says "xlsx tables" use standardized queries, while the second bullet says "Excel use SQLite SQL dialect."&amp;nbsp; Which one is right?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 14:52:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366786#M76990</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-01-05T14:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366816#M76994</link>
      <description>&lt;P&gt;I did a test where I dragged a .xlsx sheet from Catalog into the map. And then did a Select By Attributes using the following SQL expression:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;sqlite_version() is not null&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1704468106724.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90672i16C1F188009AFE7C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1704468106724.png" alt="Bud_0-1704468106724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It ran without errors and selected all rows.&lt;/P&gt;&lt;P&gt;That SQL expression uses a function that is specific to SQLite:&amp;nbsp;&lt;A href="https://www.sqlite.org/lang_corefunc.html" target="_self"&gt;sqlite_version()&lt;/A&gt;. Since the expression worked on the .xlsx, and not on other file types like File Geodatabases that use the ArcGIS SQL dialect, then I think that tells us that ArcGIS Pro uses SQLite SQL on .xlsx files.&lt;/P&gt;&lt;P&gt;So the second line in your quoted documentation seems to be correct, and the first line is incorrect.&lt;/P&gt;&lt;P&gt;I'll ask Esri to fix that documentation. Thanks for pointing that out.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 15:49:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366816#M76994</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-05T15:49:12Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366823#M76997</link>
      <description>&lt;P&gt;I submitted feedback:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#:~:text=txt%2C%20.-,xlsx%20tables,-%2C%20and%20feature%20services" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/en/pro-app/3.1/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#:~:text=txt%2C%20.-,xlsx%20tables,-%2C%20and%20feature%20services&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This bullet point is incorrect; [Excel uses the SQLite SQL dialect, not the ArcGIS SQL dialect]:&lt;/P&gt;&lt;P&gt;"File-based data, including file geodatabases, shapefiles, in-memory table views, text files such as .dbf, .csv, .txt, .xlsx tables, and feature services that use standardized queries use the ArcGIS SQL dialect that supports a subset of SQL capabilities."&lt;BR /&gt;.XLSX tables use SQLite SQL, not the ArcGIS SQL.&lt;/P&gt;&lt;P&gt;The next bullet point is correct (and contradicts the first bullet point):&lt;BR /&gt;"Mobile geodatabases, ST_geometry SQLite, GeoPackage, and Excel use SQLite SQL dialect."&lt;/P&gt;&lt;P&gt;See this post for more information:&lt;BR /&gt;"ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files?"&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366786/highlight/true#M76990" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366786/highlight/true#M76990&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could that typo be corrected?&lt;BR /&gt;Thanks,&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Unfortunately, I've found that submitting feedback is often a waste of time. Feedback is not usually addressed. So we'll see if anything happens or if the typo persists.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 15:52:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366823#M76997</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-05T15:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366853#M77009</link>
      <description>&lt;P&gt;I submitted feedback either last week or earlier this week about it already.&amp;nbsp; My experience with submitting feedback on documentation through the web pages is that I get better resolution than submitting a documentation defect with Esri Support.&amp;nbsp; Neither approach results in 100% resolution, not to mention timeliness, but somewhere between 2/3 and 3/4 of my comments get addressed eventually.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 16:11:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1366853#M77009</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2024-01-05T16:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1367090#M77042</link>
      <description>&lt;P&gt;The &lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm#:~:text=geodatabase%20data%20sources%20only" target="_self"&gt;SQL reference for query expressions used in ArcGIS&lt;/A&gt; docs also say:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Subqueries&lt;BR /&gt;A subquery is a query nested in another query and is &lt;STRONG&gt;supported by geodatabase data sources only&lt;/STRONG&gt;.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I suppose that's not strictly true, since ArcGIS Pro uses SQLite SQL for Excel SQL expressions.&lt;/P&gt;&lt;P&gt;So I'm able to use a subquery (in this case, it's a correlated subquery) in Select by Attributes or a Definition Query on an Excel file. For example, for each ASSET_ID, get the road inspection row that has the latest DATE_. If there is a tie, use the row with the largest CONDITION value.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1704699599137.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90809i8F0CF50B9D7BCC15/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1704699599137.png" alt="Bud_0-1704699599137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;roadinsptable$.objectid IN (
       SELECT objectid
         FROM roadinsptable$ r2
        WHERE r2.asset_id = roadinsptable$.asset_id
     ORDER BY date_ DESC, condition DESC
        LIMIT 1
              )&lt;/PRE&gt;&lt;P&gt;Source:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-ideas/join-control-what-related-record-gets-used/idc-p/1239993/highlight/true#M22488" target="_self"&gt;Join — Control what related record gets used&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://stackoverflow.com/questions/74756261/using-a-where-clause-subquery-select-the-greatest-n-per-group-with-a-tie-breake" target="_self"&gt;Using a WHERE clause subquery, select the greatest n per group with a tie-breaker&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;It's strange that Excel spreadsheets (not a database) have more SQL support than file geo&lt;/SPAN&gt;&lt;U&gt;databases&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;in ArcGIS Pro. As we know, FGDBs don't support correlated subqueries.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jan 2024 07:41:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1367090#M77042</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-08T07:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro uses the SQLite SQL dialect for expressions on Excel files?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1367106#M77044</link>
      <description>&lt;P&gt;Related:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.esri.com/t5/community-feedback/how-to-suggest-an-idea-about-the-esri/m-p/1367094#M2066" target="_self"&gt;Add a "Send me a copy" checkbox to the documentation feedback form —&amp;nbsp;How to suggest an idea about the Esri documentation feedback form&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jan 2024 14:04:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-uses-the-sqlite-sql-dialect-for/m-p/1367106#M77044</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-06T14:04:17Z</dc:date>
    </item>
  </channel>
</rss>

