Help with a Not In query

  • Thread starter Thread starter Robert Boisvert
  • Start date Start date
R

Robert Boisvert

I have 2 tables (Table 1 and Table 2) with a common field "Contract" and
would like to know which records that are in Table 1 and not in Table 2
based on the field "Contract" something like
select Contract from table1 where contract not in (select contract from
table2)

How do you do this??
 
Robert,

An easy way is to use the Unmatched Query Wizard that you can select when
you go to create a new query.

Here is some sample SQL from what it will create.

Gary Miller

' ******************
SELECT DISTINCTROW [Placement Data].[OCB #], [Placement Data].[Ranch]
FROM [Placement Data] LEFT JOIN [OCB CARCASS DATA] ON [Placement Data].[OCB
#] = [OCB CARCASS DATA].[OCB Eartag]
WHERE ([OCB CARCASS DATA].[OCB Eartag] Is Null);

' *******************
 
Back
Top