Deleting duplicates

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

Guest

Hi

is there any fast way to delete all duplicates of a given record in a table
(e.g. in an Access database)? Does a SQL statement exist that is able to do
this?

Thanks
Peter
 
is there any fast way to delete all duplicates of a given record in a
table
(e.g. in an Access database)? Does a SQL statement exist that is able to
do
this?

Presumably the records can't be 100% identical, or does your table not even
have a primary key...?
 
"Duplicate" means a table does not support a "primary key". In this case, an
"Insert aTablewithPrimaryKey (FieldList) select distinct (FieldList) from
duplicateTable" will do the trick. Once done, delete the old table and
rename the new table.

John
 

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