Dups show both

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

Guest

This SQL shows me records that have duplicates (>1)
It only shows one ICNNo and a NUMBER of how many >1
I need to show the data for both records so I know which to delete..

Suggeations?

SELECT tblAudit.ICNNo, Count(*) AS NUMBER
FROM tblAudit
GROUP BY tblAudit.ICNNo
HAVING (((Count(*))>1));
 
SELECT tblAudit.*
FROM tblAudit
WHERE TblAudit.ICNNo in
(SELECT ICNNo
FROM TblAudit
GROUP BY ICNo
HAVING Count(*) > 1)

You can have Access build this query using the Query Wizard Duplicates
option.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top