Find Duplicate/Unmatched

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

Guest

Using 2 existing Excel files, how do I compare these, using Access, for duplicate and unmatched data?
 
Hi,


Import them into two tables, t1 and t2.
For those appearing in both tables,


SELECT fieldToCheck
FROM ( SELECT DISTINCT fieldToCheck FROM t1
UNION ALL
SELECT DISTINCT fieldToCheck FROM t2) As a
GROUP BY fieldToCheck
HAVING COUNT(*) <> 1


For those in one table but missing in the other:

SELECT fieldToCheck
FROM ( SELECT DISTINCT fieldToCheck FROM t1
UNION ALL
SELECT DISTINCT fieldToChekc FROM t2) As a
GROUP BY fieldToChekc
HAVING COUNT(*) = 1




Hoping it may help,
Vanderghast, Access MVP



Budd R. said:
Using 2 existing Excel files, how do I compare these, using Access, for
duplicate and unmatched data?
 
Back
Top