<?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 SQL View - Union Between Two Feature Classes in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/sql-view-union-between-two-feature-classes/m-p/483652#M27501</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Forgive me here, I've been looking online, but I can't seem to find the answer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to create a view, with the Union operator within my SDE Database to effectively combine multiple feature classes together.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The tables have the same schema but I'm getting the below error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Microsoft SQL Server Native Client 10.0: The geometry data type cannot be selected as DISTINCT because it is not comparable.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the syntax I'm using for the view...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;SELECT * FROM GDA94_LL_NT_GNAF_GNAF_point&lt;BR /&gt;UNION&lt;BR /&gt;SELECT * FROM GDA94_LL_SA_GNAF_GNAF_point&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've gone through and tried selecting the Shape field out individually and I'm not having much joy at this stage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am organising SQL Training for myself, but until then, I've just hit a small brick wall.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cory&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Mar 2013 01:42:46 GMT</pubDate>
    <dc:creator>CoryWilliams</dc:creator>
    <dc:date>2013-03-22T01:42:46Z</dc:date>
    <item>
      <title>SQL View - Union Between Two Feature Classes</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-view-union-between-two-feature-classes/m-p/483652#M27501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Forgive me here, I've been looking online, but I can't seem to find the answer...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to create a view, with the Union operator within my SDE Database to effectively combine multiple feature classes together.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The tables have the same schema but I'm getting the below error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Microsoft SQL Server Native Client 10.0: The geometry data type cannot be selected as DISTINCT because it is not comparable.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the syntax I'm using for the view...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;SELECT * FROM GDA94_LL_NT_GNAF_GNAF_point&lt;BR /&gt;UNION&lt;BR /&gt;SELECT * FROM GDA94_LL_SA_GNAF_GNAF_point&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've gone through and tried selecting the Shape field out individually and I'm not having much joy at this stage.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am organising SQL Training for myself, but until then, I've just hit a small brick wall.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cory&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 01:42:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-view-union-between-two-feature-classes/m-p/483652#M27501</guid>
      <dc:creator>CoryWilliams</dc:creator>
      <dc:date>2013-03-22T01:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: SQL View - Union Between Two Feature Classes</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-view-union-between-two-feature-classes/m-p/483653#M27502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The only way a UNION ALL join could work with ArcGIS is if the registered rowid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; columns were created to be non-overlapping.&amp;nbsp; But this is a database error, indicating &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you have the wrong syntax (UNION vs UNION ALL ?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the table schemas are identical and the projection is identical, the data should be&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; in one table; if they aren't, then there isn't any point in UNIONing them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 10:48:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-view-union-between-two-feature-classes/m-p/483653#M27502</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-03-22T10:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: SQL View - Union Between Two Feature Classes</title>
      <link>https://community.esri.com/t5/data-management-questions/sql-view-union-between-two-feature-classes/m-p/483654#M27503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vangelo,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers for that. It worked. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would normally have all these datasets within the same table. I'm working with the address points data (GNAF) and it's based on different states/territories within Australia.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using a view to create a single table so that when I receive an updated dataset in the future, I only have to update the 8 datasets, which will flow through to the view which and I'm only using it for Dekho's OneSearch capability.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 22:14:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sql-view-union-between-two-feature-classes/m-p/483654#M27503</guid>
      <dc:creator>CoryWilliams</dc:creator>
      <dc:date>2013-03-22T22:14:48Z</dc:date>
    </item>
  </channel>
</rss>

