<?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 Query REST service with NULL values in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233983#M1161</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hope this is the right forum for this question.&amp;nbsp; I have a Map Service that I am trying to query at the REST endpoint on the server.&amp;nbsp; In the "Where:" field I have (CropName = 'SOY') AND (IrrigationName Like '%') as my query, which returns 3 results.&amp;nbsp; The problem is there are 10 records that match this query, with 7 of the records having 'NULL' as the value for IrrigationName.&amp;nbsp; Any reason why the query I'm using is not picking up these 7 records as well?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wade Givens&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jul 2011 14:57:31 GMT</pubDate>
    <dc:creator>WadeGivens</dc:creator>
    <dc:date>2011-07-26T14:57:31Z</dc:date>
    <item>
      <title>Query REST service with NULL values</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233983#M1161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hope this is the right forum for this question.&amp;nbsp; I have a Map Service that I am trying to query at the REST endpoint on the server.&amp;nbsp; In the "Where:" field I have (CropName = 'SOY') AND (IrrigationName Like '%') as my query, which returns 3 results.&amp;nbsp; The problem is there are 10 records that match this query, with 7 of the records having 'NULL' as the value for IrrigationName.&amp;nbsp; Any reason why the query I'm using is not picking up these 7 records as well?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wade Givens&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 14:57:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233983#M1161</guid>
      <dc:creator>WadeGivens</dc:creator>
      <dc:date>2011-07-26T14:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Query REST service with NULL values</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233984#M1162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Wade&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does that query return the expected results if fired directly at the database ? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What are you expecting? I think by putting in a LIKE you are actually saying &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Where field value is anything except null"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 17:07:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233984#M1162</guid>
      <dc:creator>ar4</dc:creator>
      <dc:date>2011-07-26T17:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Query REST service with NULL values</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233985#M1163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does IrrigationName contains 'NULL' string or database &amp;lt;NULL&amp;gt; values? If former what you pass in should work. If it is the latter then you should use IS NULL or IS NOT NULL sql clauses to work with &amp;lt;NULL&amp;gt; values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you are interested in retrieving all records irrespective of IrrigationName value then why do you specify this field in the where clause?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2011 17:09:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233985#M1163</guid>
      <dc:creator>SrinivasVinnakota</dc:creator>
      <dc:date>2011-07-26T17:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Query REST service with NULL values</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233986#M1164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Wade&lt;BR /&gt;&lt;BR /&gt;Does that query return the expected results if fired directly at the database ? &lt;BR /&gt;&lt;BR /&gt;What are you expecting? I think by putting in a LIKE you are actually saying &lt;BR /&gt;&lt;BR /&gt;"Where field value is anything except null"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;That was it exactly what the problem was.&amp;nbsp; Had to modify query to include (CropName = 'SOY') AND (IrrigationName Like '%') OR (IrrigationName Is Null)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2011 14:14:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233986#M1164</guid>
      <dc:creator>WadeGivens</dc:creator>
      <dc:date>2011-07-27T14:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Query REST service with NULL values</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233987#M1165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to see you got it working&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2011 16:42:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-rest-service-with-null-values/m-p/233987#M1165</guid>
      <dc:creator>ar4</dc:creator>
      <dc:date>2011-08-01T16:42:09Z</dc:date>
    </item>
  </channel>
</rss>

