Finding duplicated values

Поиск
Список
Период
Сортировка
От Kent Anderson
Тема Finding duplicated values
Дата
Msg-id LPENJIOOLAIJBFKIBDKOIEAHFPAD.kenta@ezyield.com
обсуждение исходный текст
Ответы Re: Finding duplicated values
Re: Finding duplicated values
Re: Finding duplicated values
Список pgsql-sql
I have a few tables that have duplicated values from an import from a different database. I have two keys I tried to set as primary and got an error
ERROR:  could not create unique index
DETAIL:  Table contains duplicated values.
 
Is there some join I can use to compare the hmhmkey, wmwmkey pairs against the table to find duplicate values? Each pair key should be unique but the old database was less than normalized.
 
I was trying to use the code below but it returned no rows.
 
SELECT hmhmkey, wmwmkey
FROM   exceptions
EXCEPT
SELECT hmhmkey, wmwmkey
FROM  exceptions;
 
Any suggestions?
 
Kent Anderson
EZYield.com
407-629-0900
 
========================================
This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged. The information is intended only for the use of the individual(s) or entity named above.  If you are not the intended recipient, be aware that any disclosure, copying or distribution or use of the contents of this information is prohibited.  If you have received this electronic transmission in error, please notify the sender immediately by replying to the address listed in the "From:" field.
 

В списке pgsql-sql по дате отправления:

Предыдущее
От: Achilleus Mantzios
Дата:
Сообщение: Re: Offtopic: psql
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Finding duplicated values