Table comparison

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

Guest

I would like to compare 2 tables to find out what are the duplicated and non-duplicated data. Please advise how to do such comparison. Thanks.
 
Hi,


An inner join will tell which are common.

Run the wizard to find unmatched records to find those that are in one of
the table, but not in the other.

If no duplicate initially exist, in each table, individually, then a UNION
ALL followed by a GROUP BY may also tell all that:


SELECT a.item, COUNT(*)
FROM ( SELECT DISTINCT item FROM table1
UNION ALL
SELECT DISTINCT item FROM table2 ) As a



would return 1 or 2, for each item, giving the number of table in which we
can find the said item.



Hoping it may help,
Vanderghast, Access MVP



dEE said:
I would like to compare 2 tables to find out what are the duplicated and
non-duplicated data. Please advise how to do such comparison. Thanks.
 

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