<?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: Spatial View does not preserve Subtype and Domain Fields in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1211994#M44235</link>
    <description>&lt;P&gt;Since it's already a view, you can populate lookups to map the integer domain values to the appropriate values.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 14:38:30 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2022-09-13T14:38:30Z</dc:date>
    <item>
      <title>Spatial View does not preserve Subtype and Domain Fields</title>
      <link>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1211545#M44232</link>
      <description>&lt;P&gt;Hello There,&lt;BR /&gt;&lt;BR /&gt;I created a spatial view from a Feature class and a Standalone table. The view works fine with data and shape.&lt;BR /&gt;But the &lt;STRONG&gt;domain&lt;/STRONG&gt; attributes/columns no more have domains related to them, and the &lt;STRONG&gt;subtype&lt;/STRONG&gt; attribute is no more recognized as a subtype field. Both fields are changed to &lt;STRONG&gt;normal fields&lt;/STRONG&gt; in the view.&lt;BR /&gt;Kindly share your thoughts to fix this.&lt;BR /&gt;&lt;BR /&gt;Environment: ArcGIS Pro 3.0, ArcCatalog 10.8.1, SQL Server 2019, Geodatabase 11.0.0.3.0&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 12:32:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1211545#M44232</guid>
      <dc:creator>User35489</dc:creator>
      <dc:date>2022-09-12T12:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial View does not preserve Subtype and Domain Fields</title>
      <link>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1211577#M44233</link>
      <description>&lt;P&gt;I think that this would be expected. Domains / Subtypes are a geodatabase function that the DB does not understand.&lt;BR /&gt;&lt;BR /&gt;Look at this post for some ideas:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/create-database-view/td-p/1122781" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-questions/create-database-view/td-p/1122781&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 14:03:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1211577#M44233</guid>
      <dc:creator>George_Thompson</dc:creator>
      <dc:date>2022-09-12T14:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial View does not preserve Subtype and Domain Fields</title>
      <link>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1211994#M44235</link>
      <description>&lt;P&gt;Since it's already a view, you can populate lookups to map the integer domain values to the appropriate values.&lt;/P&gt;&lt;P&gt;- V&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 14:38:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1211994#M44235</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2022-09-13T14:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial View does not preserve Subtype and Domain Fields</title>
      <link>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1225701#M44275</link>
      <description>&lt;P&gt;What kind of database is it?&lt;/P&gt;&lt;P&gt;If it's Oracle, then you could use the SQL from this post for coded value domains:&amp;nbsp;&lt;A href="https://gis.stackexchange.com/questions/434760/select-domain-codes-descriptions-using-xmltable-instead-of-extractvalue" target="_self"&gt;Select domain codes/descriptions&lt;/A&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;--create or replace view d_all_coded_value_domains_vw as &lt;/SPAN&gt;
&lt;SPAN class=""&gt;select&lt;/SPAN&gt;      
    &lt;SPAN class=""&gt;cast&lt;/SPAN&gt;(rownum &lt;SPAN class=""&gt;as&lt;/SPAN&gt; number(&lt;SPAN class=""&gt;38&lt;/SPAN&gt;,&lt;SPAN class=""&gt;0&lt;/SPAN&gt;)) &lt;SPAN class=""&gt;as&lt;/SPAN&gt; rownum_,
    x.code,
    x.description,
    i.name &lt;SPAN class=""&gt;as&lt;/SPAN&gt; domain_name
&lt;SPAN class=""&gt;from&lt;/SPAN&gt;        
    sde.gdb_items_vw i
&lt;SPAN class=""&gt;cross&lt;/SPAN&gt; apply xmltable(
    &lt;SPAN class=""&gt;'/GPCodedValueDomain2/CodedValues/CodedValue'&lt;/SPAN&gt; 
    passing xmltype(i.definition)
    columns
        code        varchar2(&lt;SPAN class=""&gt;255&lt;/SPAN&gt;) path &lt;SPAN class=""&gt;'./Code'&lt;/SPAN&gt;,
        description varchar2(&lt;SPAN class=""&gt;255&lt;/SPAN&gt;) path &lt;SPAN class=""&gt;'./Name'&lt;/SPAN&gt;
    ) x    
&lt;SPAN class=""&gt;where&lt;/SPAN&gt;      
    i.name &lt;SPAN class=""&gt;is&lt;/SPAN&gt; &lt;SPAN class=""&gt;not&lt;/SPAN&gt; &lt;SPAN class=""&gt;null&lt;/SPAN&gt; &lt;SPAN class=""&gt;--https://gis.stackexchange.com/questions/434701/find-problem-domains-in-gdb-items-vw&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this post for subtypes:&amp;nbsp;&lt;A href="https://gis.stackexchange.com/a/434583/62572" target="_blank" rel="noopener"&gt;https://gis.stackexchange.com/a/434583/62572&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;--create or replace view sub_lc_events_asset_class_activity_vw as (
select 
    x.subtype_code,
    x.subtype_description,
    x.subtype_field,
    x.subtype_field_domain,
    i.name as table_name
from   
    sde.gdb_items_vw i
cross apply xmltable(
    '/DETableInfo/Subtypes/Subtype/FieldInfos/SubtypeFieldInfo[FieldName="ACTIVITY"]' 
    passing xmltype(i.definition)
    columns
        subtype_code         number(38,0)  path './../../SubtypeCode',
        subtype_description  varchar2(255) path './../../SubtypeName',
        subtype_field        varchar2(255) path './FieldName',
        subtype_field_domain varchar2(255) path './DomainName'
    ) x
where  
    i.name is not null
    and i.name = 'INFRASTR.LC_EVENTS'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or use the sample Oracle or SQL Server queries here:&lt;/P&gt;&lt;P&gt;Example: &lt;A href="https://desktop.arcgis.com/en/arcmap/10.6/manage-data/using-sql-with-gdbs/example-resolving-domain-codes-to-description-values.htm" target="_self"&gt;Resolving domain codes to description values using SQL&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 15:47:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/spatial-view-does-not-preserve-subtype-and-domain/m-p/1225701#M44275</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2022-10-26T15:47:04Z</dc:date>
    </item>
  </channel>
</rss>

