Delete duplicate records in a table

G

Guest

I am trying to delete duplicate records in a table. I created the Find
Duplicates using the "Find duplicates Querry Wizard". I am not sure how to
isolate the 2nd or third duplicate record and to delete it. I would like to
automate this process via the delete querry. Can someone assist me with this
basic process?
 
W

Wolfgang Kais

Hello "hkella"
hkhella said:
I am trying to delete duplicate records in a table. I created the Find
Duplicates using the "Find duplicates Querry Wizard". I am not sure
how to isolate the 2nd or third duplicate record and to delete it.
I would like to automate this process via the delete querry.
Can someone assist me with this basic process?

Well, it's not quite basic. Think of this: How to tell Access what
records to delete?
For example, if the table contains an autoincrement field, you may want
to keep the record with the minimum id. This can very likely solved using
a correlated subquery.
But are you really sure that this decision is always correct?
And what about related records in other tables?
As said before: It's not basic.
You probably should manually decide what to do with that duplicates.
And then find a way to prevent users from entering duplicate records
using unique indexes for appropriate fields or validation rules/code.
 

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

Top