duplicate record number problem

  • Thread starter Thread starter Dale Peart
  • Start date Start date
D

Dale Peart

I am aware of how to create a table using SELECT DISTINCT to find record
duplicates but don't know how to just select the duplicate records. The
specific problem is when importing from EXCEL, there are several records
with IDs that are duplicated by mistake (dislexia, typos, etc) such that I
might have two records that look like this:

ID Project Sample Type Location
6348 ABC FA Box 12
6348 DEF FA Box 48

In actuality the first line should have an ID of 3648. I just need to find
all these lines in the table and fix them. Can someone tell me how?

Dale
 
Save the query that gives you just the duplicated IDs. Then use it as an
input "table" to another query, joined to the original table.

Alternatively, use the original query statement as a subquery in the WHERE
clause of the real query.

Or for a quick'n'dirty approach, just create a query that groups by ID, and
select Min and Max of another field (which just shows you the first and last
of possibly multiple values).
 
Back
Top