Skip site navigation (1) Skip section navigation (2)

Re: Finding duplicated values

From: Bricklen <bricklen(at)zyahoo(dot)zcomz>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Finding duplicated values
Date: 2004-10-21 19:20:42
Message-ID: e_Tdd.31475$z96.7475@clgrps12 (view raw, whole thread or download thread mbox)
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
> SELECT hmhmkey, wmwmkey
> FROM  exceptions;
> Any suggestions?
> Kent Anderson
> 407-629-0900
> <>


In response to

pgsql-sql by date

Next:From: Stephan SzaboDate: 2004-10-21 20:09:50
Subject: Re: Finding duplicated values
Previous:From: Kent AndersonDate: 2004-10-21 18:58:52
Subject: Finding duplicated values

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group