<?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 Problem with sql view union between two feature classes in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/problem-with-sql-view-union-between-two-feature/m-p/800042#M2590</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem with a view I created in our database.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Background: We have a section of county that is on a military base. &amp;nbsp;They maintain their own roads but we have a agreement that we can assist with EMS services as needed. &amp;nbsp;A few years ago, they re-addressed their roads but allow residents to use either the new or the old address. &amp;nbsp;For our 911 system we need to create a feature class that shows all roads and with duplicated records for roads with old names. &amp;nbsp;All other applications do not need the old names so we do not want to include in our normal road centerline feature class. &amp;nbsp; So we have our normal road centerline (CENPWC) feature class and a separate feature class for the old names (CENQMCB_old). &amp;nbsp;I want to union (via a view) them together so that I have single view with both sets of roads. &amp;nbsp; Both feature classes are versioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Environment: Oracle 11g with SDE 10.3.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;CREATE OR REPLACE VIEW CENPWC_NG911_VIEW &amp;nbsp;AS&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SELECT cenpwc_evw.globalid,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cenpwc_evw.shape&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;FROM cenpwc_evw&lt;BR /&gt; UNION ALL&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT cenqmcb_old_evw.globalid,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cenqmcb_old_evw.shape&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;FROM cenqmcb_old_evw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Note, I will add the other attributes in later after I get it to work in ArcMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error: &amp;nbsp;When I bring it into ArcMap, and open the attribute table it reads about half the records then I get the following error:&lt;/P&gt;&lt;P&gt;"Error reading OID from table. Reading rows has been stopped. &amp;nbsp;Check that the datasource is valid.&lt;/P&gt;&lt;P&gt;The given coordinate references are incompatible&lt;/P&gt;&lt;P&gt;The operation is not supported by this implementation."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both feature classes have the same coordinate system and extents. &amp;nbsp;The view works fine when I view it in Oracle's SQL Developer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing? &amp;nbsp;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jan 2017 21:29:50 GMT</pubDate>
    <dc:creator>KevinDunlop</dc:creator>
    <dc:date>2017-01-31T21:29:50Z</dc:date>
    <item>
      <title>Problem with sql view union between two feature classes</title>
      <link>https://community.esri.com/t5/geodatabase-questions/problem-with-sql-view-union-between-two-feature/m-p/800042#M2590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having a problem with a view I created in our database.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Background: We have a section of county that is on a military base. &amp;nbsp;They maintain their own roads but we have a agreement that we can assist with EMS services as needed. &amp;nbsp;A few years ago, they re-addressed their roads but allow residents to use either the new or the old address. &amp;nbsp;For our 911 system we need to create a feature class that shows all roads and with duplicated records for roads with old names. &amp;nbsp;All other applications do not need the old names so we do not want to include in our normal road centerline feature class. &amp;nbsp; So we have our normal road centerline (CENPWC) feature class and a separate feature class for the old names (CENQMCB_old). &amp;nbsp;I want to union (via a view) them together so that I have single view with both sets of roads. &amp;nbsp; Both feature classes are versioned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Environment: Oracle 11g with SDE 10.3.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;CREATE OR REPLACE VIEW CENPWC_NG911_VIEW &amp;nbsp;AS&lt;BR /&gt;&amp;nbsp; &amp;nbsp; SELECT cenpwc_evw.globalid,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cenpwc_evw.shape&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;FROM cenpwc_evw&lt;BR /&gt; UNION ALL&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;SELECT cenqmcb_old_evw.globalid,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cenqmcb_old_evw.shape&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;FROM cenqmcb_old_evw&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Note, I will add the other attributes in later after I get it to work in ArcMap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error: &amp;nbsp;When I bring it into ArcMap, and open the attribute table it reads about half the records then I get the following error:&lt;/P&gt;&lt;P&gt;"Error reading OID from table. Reading rows has been stopped. &amp;nbsp;Check that the datasource is valid.&lt;/P&gt;&lt;P&gt;The given coordinate references are incompatible&lt;/P&gt;&lt;P&gt;The operation is not supported by this implementation."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both feature classes have the same coordinate system and extents. &amp;nbsp;The view works fine when I view it in Oracle's SQL Developer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing? &amp;nbsp;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2017 21:29:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/problem-with-sql-view-union-between-two-feature/m-p/800042#M2590</guid>
      <dc:creator>KevinDunlop</dc:creator>
      <dc:date>2017-01-31T21:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sql view union between two feature classes</title>
      <link>https://community.esri.com/t5/geodatabase-questions/problem-with-sql-view-union-between-two-feature/m-p/800043#M2591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kevin - Are you using ST_GEOMETRY? There is a chance that the spatial references are slightly different, even though they are the same reference system. Check out the SDE_geometry_columns table and grab the 'srid' of each feature class. Then find those srids in the&amp;nbsp;SDE_spatial_references table and validate that they are the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Adam Z&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 16:04:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/problem-with-sql-view-union-between-two-feature/m-p/800043#M2591</guid>
      <dc:creator>AdamZiegler1</dc:creator>
      <dc:date>2017-02-01T16:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with sql view union between two feature classes</title>
      <link>https://community.esri.com/t5/geodatabase-questions/problem-with-sql-view-union-between-two-feature/m-p/800044#M2592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks that was the problem. &amp;nbsp;I had CENPWC at SRID 5, CENQMBC_OLD at 2283. &amp;nbsp;When I used the project tool from ArcGIS Desktop toolbox on CENQMBC_OLD it set the SRID for it 113 even though I imported the CENPWC coordinate system. &amp;nbsp;I finally can to copy both of them down to a FGDB but them in a dataset then copy them back into SDE. &amp;nbsp;This gave them both SRID 5 and the view works just fine now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Feb 2017 14:59:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/problem-with-sql-view-union-between-two-feature/m-p/800044#M2592</guid>
      <dc:creator>KevinDunlop</dc:creator>
      <dc:date>2017-02-02T14:59:18Z</dc:date>
    </item>
  </channel>
</rss>

