Compare two tables for matching criteria

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

Guest

Is it possible to report out any examples where a ID exists in Table1 but
doesn't have an entry in Table2?

My first table (Table1) has a list of entries of system changes, my second
table contains information on testing that will occur for each change.

I want to know if there are any examples where no testing has been defined
(e.g. no entry in Table2).

Appreciate your help. Thanks, al. ([email protected])
 
SELECT * FROM Table1 WHERE Table1.ID NOT IN (SELECT Table2.ID FROM Table2);

.... or ...

SELECT Table1.*
FROM Table1 LEFT JOIN Table2 ON Table1.ID = Table2.ID
WHERE (((Table2.ID) Is Null));
 
Mackay said:
Is it possible to report out any examples where a ID exists in Table1 but
doesn't have an entry in Table2?

My first table (Table1) has a list of entries of system changes, my second
table contains information on testing that will occur for each change.

I want to know if there are any examples where no testing has been defined
(e.g. no entry in Table2).


Use the query wizard to create an unmatched query.
 
Is it possible to report out any examples where a ID exists in Table1 but
doesn't have an entry in Table2?

Certainly. Use the "Unmatched Query Wizard" in the New Query option.

John W. Vinson[MVP]
 

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