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);

' *******************
 

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