Background
I know this question is a little weird, but here’s the explanation.
I have TableA in my database. I then have two separate queries that contain joins from 2 other master tables:
SELECT TableA.*
FROM MasterTable_1 INNER JOIN TableA
ON MasterTable_1.ID = TableA.ID
WHERE MasterTabe_1.Field = 'some specific value';
and
SELECT TableA.*
FROM MasterTable_2 INNER JOIN TableA
ON MasterTable_2.ID = TableA.ID
WHERE MasterTabe_2.Field = 'some specific value';
I now have values from TableA in 2 queries, same columns and everything, but this is really like having 2 tables and I cannot figure out how to get one table and one set of columns from all the data.
Question
So, my question is how can I get the TableA values from the separate SELECT/JOIN queries into one table with one set of columns where I can call SELECT DISTINCT on that final table.
If this requires more explanation let me know. Hopefully I was able to explain it well enough.
You would want to use a UNION: