Find and dump duplicate records in a new table...

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

Guest

Hi
I need a bit of help. I have of raw data I brought into access, but when I went to set the primany key I was told I had duplicates. The duplicate records have usualy have only the main field that are the same and I need to check though them manyally to see which is the correct record. I want to creating a modual that would compare the main field of the one record with the next below it to see if thy are the same, and if they are to dump both records into a new table. My Access is a little rusty, and I'm not sure how to go about doing this.
Any help would be greatly appreciated
Thank you
Chantal N.
 
Why not use the query wizard and use the Find Duplicates Query wizard to build
the query? You can then use that directly without building a separate table.

Basically the SQL statement would be something like:

SELECT YourListOfFields
FROM YourTable
WHERE TheDuplicatedField In
(SELECT Tmp.TheDuplicatedField
FROM YourTable as Tmp
GROUP BY tmp.TheDuplicatedField
HAVING Count(tmp.TheDuplicatedField) > 1)
 
Thank you, that should work. Now I just need to get my hands on the MS office 200 cd to install the wizard.
 
Back
Top