Обсуждение: Duplicates Question

Поиск
Список
Период
Сортировка

Duplicates Question

От
"ebp"
Дата:
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
 

Re: Duplicates Question

От
"Josh Berkus"
Дата:
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

Re: Duplicates Question

От
denis@coralindia.com
Дата:
 
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: ebp
Sent: Sunday, March 03, 2002 8:55 AM
Subject: [NOVICE] 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