How to find difference between two tables or queries

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Let us say that there is a table. In this case it
would be produced as the result of a query.

Sometime later the same query is run on the data
and a new table is produced.

How to run a new query that will tell which records
were deleted or added to the second table?
 
If you're doing this manually, could you join the two tables on primary key
field (in the Relationships window) and then edit the relationship to show
all records in one table not matched in the other and then vice versa?
 
Use the Unmatched Query Wizard to find the records in Table2 that are not in
Table1.

Then run the wizard again to find the records in Table1 that are not in
Table2.

(You could UNION the results if you want to see them all at once.)

You will find the Unmatched Query Wizard as the last item in the first
dialog when you create a new query.

This assumes there is some common field or fields that identify which
records are the same. (It gets rather hairy if you try to compare all fields
to identify any edits that have taken place, and you still don't know which
is the more recent of the 2 differing values.)
 

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