Thread: Duplicates Question
Recently we imported a ton of webforms into our table and sadly brought in a ton duplicates(probably people trying to enter more than one submission, to have a greater chance of winning a prize.). Is there any easy duplicates removal method?. Also some of the subscribers may have the same first/last name so we cant usually delete a range of their names. Any suggestions?
-Anthony
Anthony, > Recently we imported a ton of webforms into our table and sadly > brought in a ton duplicates(probably people trying to enter more > than one submission, to have a greater chance of winning a prize.). > Is there any easy duplicates removal method?. Also some of the > subscribers may have the same first/last name so we cant usually > delete a range of their names. Any suggestions? A similar question was just discussed on the SQL list last week. Check the archives of PGSQL-SQL. -Josh Berkus
select field1, count(1) from your_table group by field1 having count(1) > 1
If you want to compare more than one fields, just include those fields in SELECT and GROUP BY clause...
Hope this helps.
Denis
----- Original Message -----From: ebpSent: Sunday, March 03, 2002 8:55 AMSubject: [NOVICE] Duplicates QuestionRecently we imported a ton of webforms into our table and sadly brought in a ton duplicates(probably people trying to enter more than one submission, to have a greater chance of winning a prize.). Is there any easy duplicates removal method?. Also some of the subscribers may have the same first/last name so we cant usually delete a range of their names. Any suggestions?-Anthony