Re: Finding duplicated values

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Finding duplicated values
Дата
Msg-id 20041021130815.Y66555@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Finding duplicated values  ("Kent Anderson" <kenta@ezyield.com>)
Список pgsql-sql
On Thu, 21 Oct 2004, Kent Anderson wrote:

> 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.

Maybe
SELECT hmhmkey, wmwmkeyFROM exceptionsGROUP BY hmhmkey, wmwmkeyHAVING count(*)>1;


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

Предыдущее
От: "Kent Anderson"
Дата:
Сообщение: Finding duplicated values
Следующее
От: Dmitry Tkach
Дата:
Сообщение: Trouble with explicit joins