<?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 Use computed columns in feature class in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/use-computed-columns-in-feature-class/m-p/1174106#M55184</link>
    <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;I'd like to use a own SQL function that I created in HANA Studio and added a computed column to my feature class .The SDE is in a SAP Hana Database obviously.&lt;BR /&gt;&lt;BR /&gt;The SQL function looks like this:&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;CREATE FUNCTION  GET_BEZIRK (IN geom ST_GEOMETRY)
RETURNS 
	namgem NVARCHAR(100) LANGUAGE SQLSCRIPT AS
BEGIN
DECLARE point ST_GEOMETRY;

point = :geom.ST_CENTROID();

SELECT bezirk.NAMGEM INTO namgem FROM "SCHEMA"."BEZIRK" bezirk WHERE point.ST_INTERSECTS(bezirk.shape) = 1;
END;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My expectation is to calculate the column,&amp;nbsp; when a&amp;nbsp; new feature is added to the feature class. The outcome unfortunately looks like this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JuliusKnade_1-1652693180427.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41407iADBECBA12967179F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JuliusKnade_1-1652693180427.png" alt="JuliusKnade_1-1652693180427.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Another way to solve the problem is the usage of attribute rules, but to be honest I'd like to use the Database for the heavy lifting.&lt;/P&gt;&lt;P&gt;Maybe some of you guys encountered something similar or has an idea why the field can't be computed in that fashion. I'm a bit clueless.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2022 09:35:23 GMT</pubDate>
    <dc:creator>JuliusKnade</dc:creator>
    <dc:date>2022-05-16T09:35:23Z</dc:date>
    <item>
      <title>Use computed columns in feature class</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-computed-columns-in-feature-class/m-p/1174106#M55184</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;I'd like to use a own SQL function that I created in HANA Studio and added a computed column to my feature class .The SDE is in a SAP Hana Database obviously.&lt;BR /&gt;&lt;BR /&gt;The SQL function looks like this:&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;CREATE FUNCTION  GET_BEZIRK (IN geom ST_GEOMETRY)
RETURNS 
	namgem NVARCHAR(100) LANGUAGE SQLSCRIPT AS
BEGIN
DECLARE point ST_GEOMETRY;

point = :geom.ST_CENTROID();

SELECT bezirk.NAMGEM INTO namgem FROM "SCHEMA"."BEZIRK" bezirk WHERE point.ST_INTERSECTS(bezirk.shape) = 1;
END;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My expectation is to calculate the column,&amp;nbsp; when a&amp;nbsp; new feature is added to the feature class. The outcome unfortunately looks like this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JuliusKnade_1-1652693180427.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41407iADBECBA12967179F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JuliusKnade_1-1652693180427.png" alt="JuliusKnade_1-1652693180427.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Another way to solve the problem is the usage of attribute rules, but to be honest I'd like to use the Database for the heavy lifting.&lt;/P&gt;&lt;P&gt;Maybe some of you guys encountered something similar or has an idea why the field can't be computed in that fashion. I'm a bit clueless.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 09:35:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-computed-columns-in-feature-class/m-p/1174106#M55184</guid>
      <dc:creator>JuliusKnade</dc:creator>
      <dc:date>2022-05-16T09:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use computed columns in feature class</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-computed-columns-in-feature-class/m-p/1176289#M55427</link>
      <description>&lt;P&gt;Are you able to reproduce the error on DB level by executing GET_BEZIRK directly? Also, which SRS are you using?&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 06:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-computed-columns-in-feature-class/m-p/1176289#M55427</guid>
      <dc:creator>MathiasKemeter</dc:creator>
      <dc:date>2022-05-23T06:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Use computed columns in feature class</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/use-computed-columns-in-feature-class/m-p/1177883#M55585</link>
      <description>&lt;P&gt;Hey Mathias,&lt;BR /&gt;&lt;BR /&gt;the function is flawlessly working in the DB. After a quick seach I found this&amp;nbsp;&lt;A href="https://support.esri.com/en/technical-article/000008488" target="_self"&gt;article&lt;/A&gt;&amp;nbsp;stating, that computed columns are not supported. Therefore I set the field values via SQL in the db for existing features and created an attribute rule for new features.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 09:21:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/use-computed-columns-in-feature-class/m-p/1177883#M55585</guid>
      <dc:creator>JuliusKnade</dc:creator>
      <dc:date>2022-05-27T09:21:04Z</dc:date>
    </item>
  </channel>
</rss>

