Select to view content in your preferred language

Query layer to show two tables as one

2805
10
Jump to solution
11-02-2021 08:21 AM
DougBrowning
MVP Esteemed Contributor

I am trying to make a query layer that shows two tables in one.  Both tables have the exact same schema.  It is not a join, just want to show the two tables like they are one to the user.  They are in the same SDE.

In SQL I can just do this 

SELECT * FROM [ilPub].[PubDBO].[TERRA], [ilPub].[PubDBO].[LMF]

In ArcMap I get a ambiguous name objectid error.  I have done a ton of searching but only finding joins.

thanks

0 Kudos
10 Replies
DougBrowning
MVP Esteemed Contributor

Just straight union if the schemas are the same, and they must be.  If not add a field list to make them the same.  Also it must have a ObjectID field.  If versioned make sure to use the views.

select * from Pub.PubDBO.Terr_evw UNION ALL select * from Pub.PubDBO.LMF_evw

hope that helps

0 Kudos