Query looking for no match between tables

  • Thread starter Thread starter TonyB
  • Start date Start date
T

TonyB

Hi,
I have two tables tblA, tblB both with an ID field. I want a query to select
records from A where there is no record in tblB with
a matching ID field ? How do I go about designing this ?

Regards
Tony
 
Hi,
Something like this:

SELECT tblA.* FROM tblA LEFT JOIN tblB ON tblA.id = tblB.id
WHERE tblB.id Is Null;
 
Hi Dan,
Thanks, that worked great.
Tony


Dan Artuso said:
Hi,
Something like this:

SELECT tblA.* FROM tblA LEFT JOIN tblB ON tblA.id = tblB.id
WHERE tblB.id Is Null;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top