List:General Discussion« Previous MessageNext Message »
From:Rahul S. Johari Date:November 8 2005 3:57pm
Subject:Deleting Duplicate Records
View as plain text  
Hi,

I used the following SQL Query to determine Duplicate Records with same Name
& Email in the row:

SELECT email, 
COUNT(email) AS NumOccur1, name, COUNT(name) AS NumOccur2
FROM mytbl
GROUP BY name, email
HAVING ( COUNT(email) > 1 ) AND ( COUNT(name) > 1 )


I want to delete all the records which are duplicate, leaving the original
record as it is. How can I delete Only the Duplicate records?

Thanks.


Thread
Delete all but the newest 100 records?Brian Dunning6 Nov
  • Re: Delete all but the newest 100 records?Jerry Swanson6 Nov
  • Re: Delete all but the newest 100 records?Bj√∂rn Persson6 Nov
  • Re: Delete all but the newest 100 records?Jeremy Cole7 Nov
    • Re: Delete all but the newest 100 records?Brian Dunning7 Nov
      • Re: Delete all but the newest 100 records?Jeremy Cole7 Nov
    • Re: Delete all but the newest 100 records?Brian Dunning7 Nov
Re: Delete all but the newest 100 records?Brian Dunning7 Nov
Re: Delete all but the newest 100 records?Brian Dunning8 Nov
  • Re: Delete all but the newest 100 records?Scott Noyes8 Nov
    • Deleting Duplicate RecordsRahul S. Johari8 Nov
Re: Delete all but the newest 100 records?Brian Dunning8 Nov
Re: Delete all but the newest 100 records?The Nice Spider8 Nov
Re: Deleting Duplicate RecordsRahul S. Johari8 Nov
Re: Deleting Duplicate RecordsRahul S. Johari8 Nov