<?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: Multiple OR's in where clause of map service query in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/multiple-or-s-in-where-clause-of-map-service-query/m-p/805165#M303</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The fact that you have OBJECTID&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;LIKE '%fdas%' seems off.&amp;nbsp;&lt;SPAN&gt;OBJECTID&amp;nbsp; is normally a numberic field and you are attempting to do a like query for a string.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;I can get a where like this to run, without issue:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;query&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;where &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"(STATE_NAME IS NOT NULL AND STATE_NAME LIKE '%fdas%') OR (STATE_ABBR IS NOT NULL AND STATE_ABBR LIKE '%fdas%')"&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Feb 2018 15:40:45 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2018-02-08T15:40:45Z</dc:date>
    <item>
      <title>Multiple OR's in where clause of map service query</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/multiple-or-s-in-where-clause-of-map-service-query/m-p/805164#M302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to do&amp;nbsp;'OR' in the WHERE clause off the Query method of a map service.&amp;nbsp;We are running into errors when providing SQL like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE&lt;BR /&gt;(&lt;BR /&gt;OBJECTID IS NOT NULL&lt;BR /&gt;AND OBJECTID LIKE '%fdas%'&lt;BR /&gt;)&lt;BR /&gt;OR (&lt;BR /&gt;ID IS NOT NULL&lt;BR /&gt;AND ID LIKE '%fdas%'&lt;BR /&gt;)&lt;BR /&gt;OR (&lt;BR /&gt;Label IS NOT NULL&lt;BR /&gt;AND Label LIKE '%fdas%'&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to be legal SQL, and the documentation says any legal SQL would work, so I'm a bit confused as to why this isn't working. It works if we do one field at a time, but it's leading to a massive amount of HTTP calls.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 00:09:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/multiple-or-s-in-where-clause-of-map-service-query/m-p/805164#M302</guid>
      <dc:creator>AdamMichaleski</dc:creator>
      <dc:date>2018-02-08T00:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple OR's in where clause of map service query</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/multiple-or-s-in-where-clause-of-map-service-query/m-p/805165#M303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;The fact that you have OBJECTID&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;LIKE '%fdas%' seems off.&amp;nbsp;&lt;SPAN&gt;OBJECTID&amp;nbsp; is normally a numberic field and you are attempting to do a like query for a string.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;I can get a where like this to run, without issue:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;query&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;where &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"(STATE_NAME IS NOT NULL AND STATE_NAME LIKE '%fdas%') OR (STATE_ABBR IS NOT NULL AND STATE_ABBR LIKE '%fdas%')"&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Feb 2018 15:40:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/multiple-or-s-in-where-clause-of-map-service-query/m-p/805165#M303</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-02-08T15:40:45Z</dc:date>
    </item>
  </channel>
</rss>

