<?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 Definition Query - CASE Statement in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/definition-query-case-statement/m-p/1232044#M62279</link>
    <description>&lt;P&gt;Does anyone know if a CASE statement can be used in a definition query in ArcGIS Pro?&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SomeField = CASE
    WHEN MONTH(GETDATE()) &amp;gt;= 8 THEN CONCAT(YEAR(GETDATE()), "-", YEAR(GETDATE())+1)
    ELSE CONCAT(YEAR(GETDATE())-1, "-", YEAR(GETDATE()))
END&lt;/LI-CODE&gt;&lt;P&gt;This statement works fine when run from SSMS on the versioned view but not from a definition query.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 23:53:10 GMT</pubDate>
    <dc:creator>MatthewGeorge</dc:creator>
    <dc:date>2022-11-15T23:53:10Z</dc:date>
    <item>
      <title>Definition Query - CASE Statement</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/definition-query-case-statement/m-p/1232044#M62279</link>
      <description>&lt;P&gt;Does anyone know if a CASE statement can be used in a definition query in ArcGIS Pro?&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SomeField = CASE
    WHEN MONTH(GETDATE()) &amp;gt;= 8 THEN CONCAT(YEAR(GETDATE()), "-", YEAR(GETDATE())+1)
    ELSE CONCAT(YEAR(GETDATE())-1, "-", YEAR(GETDATE()))
END&lt;/LI-CODE&gt;&lt;P&gt;This statement works fine when run from SSMS on the versioned view but not from a definition query.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 23:53:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/definition-query-case-statement/m-p/1232044#M62279</guid>
      <dc:creator>MatthewGeorge</dc:creator>
      <dc:date>2022-11-15T23:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query - CASE Statement</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/definition-query-case-statement/m-p/1233382#M62427</link>
      <description>&lt;P&gt;My understanding is that Pro has a pretty limited flavor/implementation of SQL, and the CASE statement is not available. The only things I can point to supporting this are a lack of mentions of "CASE" in the Esri documentation, as well as &lt;EM&gt;Manifold&lt;/EM&gt; complaining about how Esri doesn't support much in the way of SQL, but &lt;EM&gt;Manifold&lt;/EM&gt; DOES through their third-party extension. Take their marketing pitch with a grain of salt perhaps, I've never used their software.&lt;/P&gt;&lt;P&gt;Quote from the Manifold docs:&amp;nbsp;&lt;A href="https://sql4arc.com/info/sql_compared.shtml" target="_self"&gt;https://sql4arc.com/info/sql_compared.shtml&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"SQL for ArcGIS Pro provides an extensive choice of&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://sql4arc.com/doc/sql/index.htm#data_types.htm" target="_blank" rel="noopener"&gt;data types&lt;/A&gt;&lt;SPAN&gt;, including a variety of geometry and vector (tuple) types, and&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://sql4arc.com/doc/sql/index.htm#sql_operators.htm" target="_blank" rel="noopener"&gt;operators&lt;/A&gt;&lt;SPAN&gt;, including tuple operators, CASE, CASE WHEN, CAST, CASTV, and much more. There are very long listings in the various&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://sql4arc.com/doc/sql/index.htm#sql.htm" target="_blank" rel="noopener"&gt;SQL topics in the SQL for ArcGIS Pro user manual&lt;/A&gt;&lt;SPAN&gt;."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 19:52:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/definition-query-case-statement/m-p/1233382#M62427</guid>
      <dc:creator>VinceE</dc:creator>
      <dc:date>2022-11-18T19:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query - CASE Statement</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/definition-query-case-statement/m-p/1233442#M62440</link>
      <description>&lt;P&gt;Thanks Vince, I guessed as much. Looks like I'll have to add a new field to achieve the filtering I'm chasing. I'm going to add this as an idea and see if it gets any traction.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2022 22:18:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/definition-query-case-statement/m-p/1233442#M62440</guid>
      <dc:creator>MatthewGeorge</dc:creator>
      <dc:date>2022-11-18T22:18:18Z</dc:date>
    </item>
  </channel>
</rss>

