Find records not present

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello to all

maybe my question is very stupid, but I don't know how to solve this problem:

I have table1:
Code
description
....

and table 2:
Code
quantity
....

I need to find all records where Code from table1 IS NOT in table2...

Any suggestion?

Many thanks
 
Try this:

SELECT * FROM Table1
WHERE Table1.Code Not In (SELECT Table2.Code FROM Table2)

Start making a new query in design view, add no table, switch to SQL
view and paste the expression above (overwriting what's already in
there). Just make sure the table and field names are correct (change to
the actual names if these are just example names).

HTH,
Nikos
 
Back
Top