Re: [GENERAL] How to idenity duplicate rows

2006-03-19 Thread Berend Tober
Peter Eisentraut wrote: David Inglis wrote: Can anybody assist with this problem I have a table that has some duplicated rows of data, I want to place a unique constraint on the columns userid and procno to eliminate this problem in the future but how do I identify and get rid of the exist

Re: [GENERAL] How to idenity duplicate rows

2006-03-19 Thread Jan Cruz
As for deleting all but one row in a duplicated group, you're going tohave to get at them by the oid or ctid columns perhaps. The other idea is to run CREATE TABLE newtable AS SELECT DISTINCT * FROMoldtable;. I believe getting oid and/or ctid is not possible since it would not display/get duplicat

Re: [GENERAL] How to idenity duplicate rows

2006-03-19 Thread Peter Eisentraut
David Inglis wrote: > Can anybody assist with this problem I have a table that has some > duplicated rows of data, I want to place a unique constraint on the > columns userid and procno to eliminate this problem in the future but > how do I identify and get rid of the existing duplication. To fi

[GENERAL] How to idenity duplicate rows

2006-03-19 Thread David Inglis
Can anybody assist with this problem I have a table that has some duplicated rows of data,  I want to place a unique constraint on  the columns userid and procno to eliminate this problem in the future but how do I identify and get rid of the existing duplication.   Thanks in advance     Re