<?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 Re: Help understanding a query in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816008#M3440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice catch.&amp;nbsp; I was so focused on the Postgres part that I forgot about the possibility of it being an ArcGIS issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jan 2020 23:00:12 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-01-23T23:00:12Z</dc:date>
    <item>
      <title>Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816002#M3434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking for a little help understanding what the Where clause of this SQL query is doing.&amp;nbsp;This is used to define a query layer in an ArcPro map.&amp;nbsp; DBMS is postgresql&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;a.id, a.valid_date, a.id, a.name, a.net, a.elevation, a.mph, a.local_time, a.shape&lt;BR /&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;obs.gusts AS a&lt;BR /&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;::r:DateTime&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that the last line is a cast function, but I do not understand what the "r" represents and how it's filtering the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 15:24:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816002#M3434</guid>
      <dc:creator>MarieCline_Delgado</dc:creator>
      <dc:date>2020-01-23T15:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816003#M3435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most of the SQL statement is straightforward, but there are a couple of things about the WHERE clause that are odd to me.&amp;nbsp; How are you extracting this query?&amp;nbsp; Are you copying and pasting it or typing it from what you seen on a screen?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 16:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816003#M3435</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-01-23T16:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816004#M3436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The query is a property of an existing&amp;nbsp;Query Layer in a map within ArcPro.&amp;nbsp; I copied/pasted from the properties into the message above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 16:30:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816004#M3436</guid>
      <dc:creator>MarieCline_Delgado</dc:creator>
      <dc:date>2020-01-23T16:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816005#M3437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am stumped, then.&amp;nbsp; You are correct that double colons are historical Postgres syntax for type casting, and type casting can be chained using the old syntax:&lt;/P&gt;&lt;PRE class="line-numbers language-sql"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"1"&lt;/SPAN&gt;::&lt;SPAN class="keyword token"&gt;real&lt;/SPAN&gt;::&lt;SPAN class="keyword token"&gt;integer&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Postgres isn't my primary DBMS, but 2 things are throwing me:&amp;nbsp; 1) type casting requires an expression to the left of the double colon, which appears to not exist; and 2) single quotes are usually used for slicing arrays but that doesn't make sense given the syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This may be some clever use of Postgres operators, but clever is the death of readability and maintainability.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the query layer give the same results if you remove the WHERE clause?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 19:17:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816005#M3437</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-01-23T19:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816006#M3438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I share all of these thoughts and feelings with you!&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did try removing the WHERE clause and it&amp;nbsp;DOES change the results.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would expect that it is filtering&amp;nbsp;a time field, but I haven't been able to find a pattern yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 19:50:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816006#M3438</guid>
      <dc:creator>MarieCline_Delgado</dc:creator>
      <dc:date>2020-01-23T19:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816007#M3439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally found something.&amp;nbsp;&lt;BR /&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/help/data/query-layers/define-parameters-in-a-query-layer.htm" title="https://pro.arcgis.com/en/pro-app/help/data/query-layers/define-parameters-in-a-query-layer.htm"&gt;Define parameters in a query layer—Query layers | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looks like it's a range parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 20:21:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816007#M3439</guid>
      <dc:creator>MarieCline_Delgado</dc:creator>
      <dc:date>2020-01-23T20:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816008#M3440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice catch.&amp;nbsp; I was so focused on the Postgres part that I forgot about the possibility of it being an ArcGIS issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2020 23:00:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816008#M3440</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-01-23T23:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816009#M3441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The range parameters are a powerful feature of a query layer as per this thread which goes to the same link as you:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/205904-dynamic-date-value-in-filter-widget-using-arcgis-online"&gt;https://community.esri.com/thread/205904-dynamic-date-value-in-filter-widget-using-arcgis-online&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This might be of use to you if you want to use range parameters in a web application.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 06:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816009#M3441</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2020-01-24T06:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help understanding a query</title>
      <link>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816010#M3442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same here!&amp;nbsp; Thanks for helping me explore to understand.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 14:28:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/help-understanding-a-query/m-p/816010#M3442</guid>
      <dc:creator>MarieCline_Delgado</dc:creator>
      <dc:date>2020-01-24T14:28:15Z</dc:date>
    </item>
  </channel>
</rss>

