<?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 FGDB SQL — Use CONCAT to concatenate string and date/number without casting in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-use-concat-to-concatenate-string-and-date/idi-p/1369904</link>
    <description>&lt;P&gt;&lt;EM&gt;Edited. The previous title was "FGDB SQL function to convert date to string (or concatenate date)."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ArcGIS Pro 3.2.1&lt;/EM&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;Regarding file geodatabase SQL:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-file-gdb/sql-reporting-and-anlysis-file-geodatabases.htm#:~:text=the%20string%20expression.-,CONCAT,-(string_exp1%2C%20string_exp2)" target="_self"&gt;SQL for reporting and analysis on file geodatabases&lt;/A&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;There are times when I want to include a date in a string. But the CONCAT() function can't seem to handle dates.&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;For example, this works in a FGDB database view:&lt;/P&gt;&lt;PRE&gt;select&lt;BR /&gt;    objectid,&lt;BR /&gt;    concat(t_species,&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt; t_species&lt;/STRONG&gt;&lt;/FONT&gt;) as concat&lt;BR /&gt;from&lt;BR /&gt;    species_records&lt;/PRE&gt;&lt;P&gt;But this doesn't:&lt;/P&gt;&lt;PRE&gt;select&lt;BR /&gt;    objectid,&lt;BR /&gt;    concat(t_species,&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt; t_date&lt;/STRONG&gt;&lt;/FONT&gt;) as concat&lt;BR /&gt;from&lt;BR /&gt;    species_records&lt;/PRE&gt;&lt;PRE&gt;ERROR 160195: An invalid SQL statement was used.&lt;/PRE&gt;&lt;P&gt;Could the CONCAT() function be enhanced so that it accepts dates?&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2024 05:14:49 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2024-01-17T05:14:49Z</dc:date>
    <item>
      <title>FGDB SQL — Use CONCAT to concatenate string and date/number without casting</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-use-concat-to-concatenate-string-and-date/idi-p/1369904</link>
      <description>&lt;P&gt;&lt;EM&gt;Edited. The previous title was "FGDB SQL function to convert date to string (or concatenate date)."&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ArcGIS Pro 3.2.1&lt;/EM&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;Regarding file geodatabase SQL:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-file-gdb/sql-reporting-and-anlysis-file-geodatabases.htm#:~:text=the%20string%20expression.-,CONCAT,-(string_exp1%2C%20string_exp2)" target="_self"&gt;SQL for reporting and analysis on file geodatabases&lt;/A&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;There are times when I want to include a date in a string. But the CONCAT() function can't seem to handle dates.&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;For example, this works in a FGDB database view:&lt;/P&gt;&lt;PRE&gt;select&lt;BR /&gt;    objectid,&lt;BR /&gt;    concat(t_species,&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt; t_species&lt;/STRONG&gt;&lt;/FONT&gt;) as concat&lt;BR /&gt;from&lt;BR /&gt;    species_records&lt;/PRE&gt;&lt;P&gt;But this doesn't:&lt;/P&gt;&lt;PRE&gt;select&lt;BR /&gt;    objectid,&lt;BR /&gt;    concat(t_species,&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt; t_date&lt;/STRONG&gt;&lt;/FONT&gt;) as concat&lt;BR /&gt;from&lt;BR /&gt;    species_records&lt;/PRE&gt;&lt;PRE&gt;ERROR 160195: An invalid SQL statement was used.&lt;/PRE&gt;&lt;P&gt;Could the CONCAT() function be enhanced so that it accepts dates?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 05:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-use-concat-to-concatenate-string-and-date/idi-p/1369904</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-17T05:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: FGDB SQL function to convert date to string (or concatenate date)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-use-concat-to-concatenate-string-and-date/idc-p/1370030#M28030</link>
      <description>&lt;P&gt;My 2 cents. Certain SQL operations are only available in a RDBMS (Oracle, SQL Server, PortgreSQL) because the SQL Engine behind the RDBMS that is quite complex. Certain SQL functions in a File Geodatabase might not be available and it will be difficult to implement that because of this reason. Therefore, the best aproach is move the data from the File Geodatabase to an Enterprise Geodatabase, even Mobile Geodatabase will present some limitations as well, thus move the data to an Enterprise Database (Oracle, SQL Server, PostgreSQL). I hope this helps.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Jan 2024 20:34:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-use-concat-to-concatenate-string-and-date/idc-p/1370030#M28030</guid>
      <dc:creator>MarceloMarques</dc:creator>
      <dc:date>2024-01-14T20:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: FGDB SQL function to convert date to string (or concatenate date)</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-use-concat-to-concatenate-string-and-date/idc-p/1370838#M28048</link>
      <description>&lt;P&gt;Related:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://community.esri.com/t5/geodatabase-questions/select-maximum-values-in-select-by-attributes/m-p/1370587/highlight/true#M8785" target="_self"&gt;Comments in an unrelated post about the CAST() function in FGDB SQL&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Esri Case &lt;SPAN&gt;03529800&lt;/SPAN&gt;: FGDB database view: Can't use CAST function in WHERE clause&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Edit: I think this idea still applies, despite the existence of the CAST function. The CONCAT function should be able to automatically convert dates and numbers to strings when concatenating a string and a number/date.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 06:25:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/fgdb-sql-use-concat-to-concatenate-string-and-date/idc-p/1370838#M28048</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2024-01-18T06:25:04Z</dc:date>
    </item>
  </channel>
</rss>

