Getting rid of duplicates

  • Thread starter Thread starter APH
  • Start date Start date
A

APH

Hi i have been tidying up and amlgamating some databases.

I now have a query of about 8000 records, within which there are multiple
instances of two of more records being duplicated - based on 3 fields being
the same. I want to go through and get rid of all the duplicated records, -
is there a quick way of doing this, or will I need to write some code to
look at each record in turn and if it matches the p[revious then delete it.

if so, does anyopne know if there is some code already written which just
requires modfification.

Thanks

Alex
 
Probably the easiest way to get rid of the dups is like
this:
Copy and Paste your original table as structure only.
Apply Primary Keys to all three fields that may have dups.
Make an append query with the original table appending the
records into the new table.
With the primary keys set you will receive a Key Violation
error telling you how many records cannot be appended.
Choose YES and the remaining records will be appended to
the new table....dups gone.
 
Hi

More information about your query is needed.
I now have a query of about 8000 records, within which there are multiple
instances of two of more records being duplicated - based on 3 fields
being

You said you have a *query*. What makes up the query? Several tables? With
one to many relationships?
A query based on several tables with one to many relationships can result in
the appearance of some fields being duplicated even though at the table
level, all records are unique.


Immanuel Sibero




APH said:
Hi i have been tidying up and amlgamating some databases.

I now have a query of about 8000 records, within which there are multiple
instances of two of more records being duplicated - based on 3 fields being
the same. I want to go through and get rid of all the duplicated records, -
is there a quick way of doing this, or will I need to write some code to
look at each record in turn and if it matches the p[revious then delete it.

if so, does anyopne know if there is some code already written which just
requires modfification.

Thanks

Alex
 
Thanks Liz/Immanuel for your input.

Liz your idea is so obvious when you think about it - always pays to have
different prespective!

In fact your idea didn't quite workas suggested. When I tried, it stopped
all but 64 records being appended. I assume that the three No-Dups fields
were working "Or". Anyway created temp field. Concatanated the three bits
of data into this field and then ran as you suggested and it worked a treat

Thanks

Alex
 
Back
Top