<?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: SQL commands for calculating a field with python in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336866#M55006</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/75013"&gt;@RichardHowe&lt;/a&gt;&amp;nbsp;, does something like this help ?&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm" target="_blank"&gt;https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Oct 2023 09:57:33 GMT</pubDate>
    <dc:creator>ChrisUnderwood</dc:creator>
    <dc:date>2023-10-11T09:57:33Z</dc:date>
    <item>
      <title>SQL commands for calculating a field with python</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336860#M55005</link>
      <description>&lt;P&gt;I'm currently trying to write a python notebook to live in AGOL that will calculate a field based on other fields.&lt;BR /&gt;&lt;BR /&gt;For whatever reason, the expression has to be written in SQL&lt;BR /&gt;&lt;BR /&gt;calc_expression=[{"field": "Fieldname", "sqlExpression" : ""}]&lt;BR /&gt;&lt;BR /&gt;Is there a list anywhere of which SQL commands will work? From experimenting I can see that CONCAT works fine, but I have a need to add leading zeros to a number and the RIGHT, LPAD and FORMAT commands all throw errors&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 09:37:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336860#M55005</guid>
      <dc:creator>RichardHowe</dc:creator>
      <dc:date>2023-10-11T09:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: SQL commands for calculating a field with python</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336866#M55006</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/75013"&gt;@RichardHowe&lt;/a&gt;&amp;nbsp;, does something like this help ?&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm" target="_blank"&gt;https://doc.arcgis.com/en/arcgis-online/reference/sql-agol.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 09:57:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336866#M55006</guid>
      <dc:creator>ChrisUnderwood</dc:creator>
      <dc:date>2023-10-11T09:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: SQL commands for calculating a field with python</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336871#M55007</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/159762"&gt;@ChrisUnderwood&lt;/a&gt;&amp;nbsp; Very useful Thank you! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Seems I'm not going to be able to pad with leading zeros then, unless you have any clever tricks?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 10:19:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336871#M55007</guid>
      <dc:creator>RichardHowe</dc:creator>
      <dc:date>2023-10-11T10:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: SQL commands for calculating a field with python</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336877#M55009</link>
      <description>&lt;P&gt;Why not do a query() to get all the records you need to edit, edit the features using regular Python functions, then use edit_features() to post the edits?&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 10:43:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336877#M55009</guid>
      <dc:creator>MobiusSnake</dc:creator>
      <dc:date>2023-10-11T10:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: SQL commands for calculating a field with python</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336881#M55010</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/75013"&gt;@RichardHowe&lt;/a&gt;&amp;nbsp; what data Type is the Field you want to pad, and what is a typical item of data that is to be padded ?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisUnderwood_0-1697021631137.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/82845i53A0FF8F2B3B4A65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisUnderwood_0-1697021631137.png" alt="ChrisUnderwood_0-1697021631137.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 10:55:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336881#M55010</guid>
      <dc:creator>ChrisUnderwood</dc:creator>
      <dc:date>2023-10-11T10:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: SQL commands for calculating a field with python</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336883#M55011</link>
      <description>&lt;P&gt;I'm writing a script to generate an ID that will run once offline data is sync'd back to the hosted feature layer. I'm using ObjectID as the initial numeric to concatenate with a custom string prefix.&lt;BR /&gt;&lt;BR /&gt;I seem to have got around it by querying for length of ObjectID and padding accordingly&lt;BR /&gt;&lt;BR /&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 11:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/sql-commands-for-calculating-a-field-with-python/m-p/1336883#M55011</guid>
      <dc:creator>RichardHowe</dc:creator>
      <dc:date>2023-10-11T11:05:01Z</dc:date>
    </item>
  </channel>
</rss>

