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
Solved! Go to Solution.
If you want to write a SQL statement to accomplish this without appending the tables, you can use a UNION
https://mode.com/sql-tutorial/sql-union/
The two are not related. Just want to show both.
Table 1
1
2
3
Table 2
7
8
9
Final table
1
2
3
7
8
9
Thanks
In order to do this you must have a unique ID that you can either join or relate the tables.
They are not to be joined or related. I just want to see both at once in the same table. So if I have 1,000 records in table 1 and 500 in table 2 then the result table has 1,500 rows.
Thanks
Do you want them to be permanently this way? If so, you always append one table to the other.
If you want to write a SQL statement to accomplish this without appending the tables, you can use a UNION
https://mode.com/sql-tutorial/sql-union/
Ok it looks like that worked. thanks a lot
You're welcome
Hi, just wondering if you can post an example of the union sql you used for this query layer? I have tried the options provide on https://mode.com/sql-tutorial/sql-union/ but I am receiving a "Operation failed" message in ArcGIS Pro.