I've been having a problem with the structure of a simple 'no-match' query. For example, I have two tables... Table 1 and Table 2. I want to pull all the records from table 1 that are not in table two.
Table 1 Table 2
Id Id
Here's what I've written, but I'm a bit stuck..
--------------------------------
select distinct
Table1.Id,
Table2.Id
from Table1
Table2
left join Table1 on Table2.Id = Table1.Id
where Table2.ID is null;
-------------------------------------
I'm obviously doing something wrong... Can someone please help! Thanks so much!
Table 1 Table 2
Id Id
Here's what I've written, but I'm a bit stuck..
--------------------------------
select distinct
Table1.Id,
Table2.Id
from Table1
Table2
left join Table1 on Table2.Id = Table1.Id
where Table2.ID is null;
-------------------------------------
I'm obviously doing something wrong... Can someone please help! Thanks so much!