From: | Christoph Haller <ch(at)rodos(dot)fzk(dot)de> |
---|---|
To: | Kent Anderson <kenta(at)ezyield(dot)com>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Finding duplicated values |
Date: | 2004-10-22 07:49:28 |
Message-ID: | 4178BB88.D7175ADC@rodos.fzk.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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.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
You might want to search the [SQL] archive on the following topics
for more inspiration:
selecting duplicate records
Delete 1 Record of 2 Duplicate Records
Regards, Christoph
From | Date | Subject | |
---|---|---|---|
Next Message | JN | 2004-10-22 12:04:18 | now() + integer, not rounded to whole day |
Previous Message | Davide Negri | 2004-10-22 06:59:56 | Question on the 8.0Beta Version |