Newbie: Select records in Table A not in Table B

  • Thread starter Thread starter Terry
  • Start date Start date
T

Terry

I have a table A which has details of all potential
clients in it. I have another table B of actual clients.
Both tables have a common field (client number). I now
just want a query which selects the clients from table A
which are not in table B, in order words, I want a list of
potential clients only. I've now spent several hours
trying to find out how to do this but to no avail. I am
pretty sure the answer to this is dead simple.

Any help would be greatly appreciated and would save me
many more hours of fruitless, frustrating foraging through
books and over the internet.

Terry.
 
You use an Outer Join to do this. Something like this:

SELECT A.* From A
LEFT JOIN B ON
A.[client number] = B.[client number]
WHERE B.[client number] Is Null;
 
Back
Top