Delete Duplicate Records 
Author Message
 Delete Duplicate Records

I used the wizard query to find duplicate records from a table.  Now I'm
trying to delete those sets of duplicates but keep one record from the set.
How can I do that?

Any help is greatly appreciated.

Brandon



Fri, 15 Jun 2001 03:00:00 GMT  
 Delete Duplicate Records
Brandon--
    If you are talking about true dupes (all fields the same) try this:
        SELECT DISTINCT WITHDUPES.*
        INTO NODUPES
        FROM WITHDUPES
    If you are talking about dupe keys with (potentially) different data
values try this:
        SELECT WITHDUPES.KeyVar1,...,WITHDUPES.KeyVarN,
            Agg1(WITHDUPES.DataVar1),...,AggM(WITHDUPES.DataVarM)
        INTO NODUPES
        FROM WITHDUPES
where Agg1 ... AggM are functions like MIN, MAX, FIRST, LAST
HTH, Roger


Quote:
>I'm trying to delete duplicates
>Brandon



Sat, 16 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. deleting duplicate records

2. Delete duplicate records ...revisited

3. easy way to delete duplicated records?

4. Deleting Duplicate Records in a Table?

5. Deleting Duplicate Records In A For Next Loop

6. How do you delete duplicate records from Access table

7. Help Deleting Duplicate records

8. How to Delete Duplicate records in Access Table ??

9. Help: delete duplicate records

10. Deleting Duplicate Records In A For Next Loop

11. Deleting duplicate records from table

12. Help Deleting Duplicate records

 

 
Powered by phpBB® Forum Software