Here's how I ended up doing it. I had to divide it into three different queries: one query for unique values in Table1, one query for unique values in Table2, and one query for the combined values. Then I combined all three with unions.
Code:
SELECT * INTO ResultTable FROM [ select ID, VALUE from Table1 where Table1.ID not in (select ID from Table2) union select Table1.ID,
Leave a comment: