<?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: Examples of field calculations using SQL in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/examples-of-field-calculations-using-sql/m-p/1273072#M35497</link>
    <description>&lt;P&gt;A simple point-in-polygon intersect update statement is faster at the RDBMS level. Note: this assumes and requires that the data have the same SRID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;UPDATE SourceTable
SET s.ColumnA = t.ColumnB
FROM SourceTable s
JOIN TargetTable t
ON s.Shape.STIntersects(t.Shape)=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 15:02:13 GMT</pubDate>
    <dc:creator>CoffeeforClosers</dc:creator>
    <dc:date>2023-03-29T15:02:13Z</dc:date>
    <item>
      <title>Examples of field calculations using SQL</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/examples-of-field-calculations-using-sql/m-p/1272255#M35472</link>
      <description>&lt;P&gt;It's possible to use SQL in field calculations for non-versioned enterprise geodatabases:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/calculate-field.htm" target="_self" rel="nofollow noopener noreferrer"&gt;Calculate Field (Data Management)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;SQL expressions support faster calculations for feature services and enterprise geodatabases. Instead of performing calculations one feature or row at a time, a single request is sent to the server or database, resulting in faster calculations.&lt;/P&gt;&lt;P&gt;Only feature services and enterprise geodatabases support SQL expressions. For other formats, use&amp;nbsp;&lt;SPAN class=""&gt;Python&amp;nbsp;&lt;/SPAN&gt;or&amp;nbsp;&lt;SPAN class=""&gt;Arcade&amp;nbsp;&lt;/SPAN&gt;expressions.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Out of curiosity, what are some examples of SQL expressions you use as field calculations?&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Do you find there are things that are simpler to do in SQL vs Python/Arcade?&lt;/LI&gt;&lt;LI&gt;Do you use subqueries in your SQL field calculations? Or spatial SQL functions?&lt;/LI&gt;&lt;LI&gt;Can you simply write something like &lt;FONT face="courier new,courier" color="#0000FF"&gt;CASE WHEN 1=1 THEN 1 END&lt;/FONT&gt; as a field calculation?&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I only have ArcGIS Pro 2.6.8 which doesn't seem to support SQL field calculations on enterprise geodatabases. So I can't test and am curious what's possible.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 22:40:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/examples-of-field-calculations-using-sql/m-p/1272255#M35472</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-03-27T22:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Examples of field calculations using SQL</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/examples-of-field-calculations-using-sql/m-p/1273072#M35497</link>
      <description>&lt;P&gt;A simple point-in-polygon intersect update statement is faster at the RDBMS level. Note: this assumes and requires that the data have the same SRID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;UPDATE SourceTable
SET s.ColumnA = t.ColumnB
FROM SourceTable s
JOIN TargetTable t
ON s.Shape.STIntersects(t.Shape)=1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 15:02:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/examples-of-field-calculations-using-sql/m-p/1273072#M35497</guid>
      <dc:creator>CoffeeforClosers</dc:creator>
      <dc:date>2023-03-29T15:02:13Z</dc:date>
    </item>
  </channel>
</rss>

