<?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: How to find the minimum and maximum values of an Object ID in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64755#M2362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Table_name can be replaced with the actual name of the table on disk or DBMS. Are you using SDE or a FGDB here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 May 2016 23:39:27 GMT</pubDate>
    <dc:creator>ChristianWells</dc:creator>
    <dc:date>2016-05-24T23:39:27Z</dc:date>
    <item>
      <title>How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64752#M2359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am trying to write some Python scripts to query a REST endpoint but am not very familiar with SQL lingo. I would like to do it in the environment of the ArcGIS REST Services Directory for a particular map service layer. How would I go about finding the minimum value of the Object ID as well as the maximum value of the Object ID in the 'Where' clause? It is probably very simple so sorry for the lack of understanding.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 21:46:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64752#M2359</guid>
      <dc:creator>JaromHlebasko</dc:creator>
      <dc:date>2016-05-23T21:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64753#M2360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to do this via a subquery:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14640437040506826 jive_text_macro" data-renderedposition="34_8_955_16" jivemacro_uid="_14640437040506826" modifiedtitle="true"&gt;&lt;P&gt;id = (select max(id) from table_name)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To do this, standardized queries must be set to true:&lt;/P&gt;&lt;P&gt;&lt;A href="http://server.arcgis.com/en/server/10.3/administer/linux/about-standardized-queries.htm#ESRI_SECTION1_D6560EA79923467BA1C959F740125E4D" title="http://server.arcgis.com/en/server/10.3/administer/linux/about-standardized-queries.htm#ESRI_SECTION1_D6560EA79923467BA1C959F740125E4D"&gt;About standardized queries—Documentation (10.3 and 10.3.1) | ArcGIS for Server&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 22:48:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64753#M2360</guid>
      <dc:creator>ChristianWells</dc:creator>
      <dc:date>2016-05-23T22:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64754#M2361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can’t figure out how to specify the table_name variable in the suggested subquery:&lt;/P&gt;&lt;P&gt;&amp;nbsp; id = (select max(id) from table_name)&lt;/P&gt;&lt;P&gt;and then also form the appropriate query with the subquery embedded within it. Everything I try, including the value “table_name” itself, gets me a “Cannot open table for Load” error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 23:18:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64754#M2361</guid>
      <dc:creator>JaromHlebasko</dc:creator>
      <dc:date>2016-05-24T23:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64755#M2362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Table_name can be replaced with the actual name of the table on disk or DBMS. Are you using SDE or a FGDB here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 23:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64755#M2362</guid>
      <dc:creator>ChristianWells</dc:creator>
      <dc:date>2016-05-24T23:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64756#M2363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm actually trying to query a MapServer REST endpoint In the ArcGIS REST Services Directory. I set it up as an SDE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 23:46:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64756#M2363</guid>
      <dc:creator>JaromHlebasko</dc:creator>
      <dc:date>2016-05-24T23:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64757#M2364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure how to do it with 'Where Clause' but you could return the stats on the layer from the REST Query to get the min and max.&lt;/P&gt;&lt;P&gt;e.g.leave all blank and use this for Output Statistics&lt;/P&gt;&lt;P&gt;[{"statisticType":"min","onStatisticField":"objectid", "outStatisticFieldName":"MinID"},&lt;/P&gt;&lt;P&gt;{"statisticType":"max","onStatisticField":"objectid", "outStatisticFieldName":"MaxID"}]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example using ESRI sample server:&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/LocalGovernment/Recreation/MapServer/0/query?where=&amp;amp;text=&amp;amp;objectIds=&amp;amp;time=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;outFields=&amp;amp;returnGeometry=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=[%0D%0A{%22statisticType%22%3A%22min%22%2C%22onStatisticField%22%3A%22objectid%22%2C+%22outStatisticFieldName%22%3A%22MinID%22}%2C%0D%0A{%22statisticType%22%3A%22max%22%2C%22onStatisticField%22%3A%22objectid%22%2C+%22outStatisticFieldName%22%3A%22MaxID%22}%0D%0A]&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;returnDistinctValues=false&amp;amp;returnTrueCurves=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;f=html" title="https://sampleserver6.arcgisonline.com/arcgis/rest/services/LocalGovernment/Recreation/MapServer/0/query?where=&amp;amp;text=&amp;amp;objectIds=&amp;amp;time=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;outFields=&amp;amp;returnGeometry=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=[%0D%0A{%22statisticType%22%3A%22min%22%2C%22onStatisticField%22%3A%22objectid%22%2C+%22outStatisticFieldName%22%3A%22MinID%22}%2C%0D%0A{%22statisticType%22%3A%22max%22%2C%22onStatisticField%22%3A%22objectid%22%2C+%22outStatisticFieldName%22%3A%22MaxID%22}%0D%0A]&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;returnDistinctValues=false&amp;amp;returnTrueCurves=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;f=html"&gt;Query: Facilities (ID: 0)&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 16:05:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64757#M2364</guid>
      <dc:creator>RobWaller</dc:creator>
      <dc:date>2016-05-25T16:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64758#M2365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect! Worked like a charm. Thank you! Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 18:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64758#M2365</guid>
      <dc:creator>JaromHlebasko</dc:creator>
      <dc:date>2016-05-25T18:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64759#M2366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was wondering if anybody is having problems using select(max) in ArcServer 10.5.&amp;nbsp; I have a 10.2 rest service that is querying a layer with this where clause "ElectionDate&amp;nbsp;in (SELECT max(ElectionDate) FROM PollingPlaceHistory)" and it works fine.&amp;nbsp; But the&amp;nbsp;10.5 service using the same data will not work.&amp;nbsp;&lt;/P&gt;&lt;H2 style="color: #000000; font-weight: bold; font-size: 1.2em;"&gt;&lt;/H2&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 May 2018 20:26:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/64759#M2366</guid>
      <dc:creator>ViktoriaMagnis</dc:creator>
      <dc:date>2018-05-07T20:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find the minimum and maximum values of an Object ID</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/1085988#M30830</link>
      <description>&lt;P&gt;Just wanted to let you know that this was a huge help to me today. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 22:26:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-find-the-minimum-and-maximum-values-of-an/m-p/1085988#M30830</guid>
      <dc:creator>JRhodes</dc:creator>
      <dc:date>2021-08-04T22:26:11Z</dc:date>
    </item>
  </channel>
</rss>

