Re: [GENERAL] How to delete completely duplicate rows

2014-01-02 Thread Merlin Moncure
On Thu, Jan 2, 2014 at 4:33 AM, Janek Sendrowski wrote: > Thanks! > It's working you can do it without listing columns via: select *, row_number() over(partition by c) from c; emphasis on 'partition by c'. merlin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make

Re: [GENERAL] How to delete completely duplicate rows

2014-01-02 Thread Janek Sendrowski
Thanks! It's working   Janek -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to delete completely duplicate rows

2014-01-01 Thread bricklen
On Wed, Jan 1, 2014 at 4:14 AM, Janek Sendrowski wrote: > I want to delete duplicates in my table. I've dropped the unique > constraint to insert my data. > My id value is a hash calculated witch the values of the two other columns. > So I want to delete all columns, which are indentical, but kee

Re: [GENERAL] How to delete completely duplicate rows

2014-01-01 Thread Erik Darling
With C as ( Select row_number() over partition by (list, all, columns, here order by oid) as rn ) Delete >From C Where rn > 1; On Jan 1, 2014 7:15 AM, "Janek Sendrowski" wrote: > Hi, > > I want to delete duplicates in my table. I've dropped the unique > constraint to insert my data. > My id valu

[GENERAL] How to delete completely duplicate rows

2014-01-01 Thread Janek Sendrowski
Hi,   I want to delete duplicates in my table. I've dropped the unique constraint to insert my data. My id value is a hash calculated witch the values of the two other columns. So I want to delete all columns, which are indentical, but keeping one.   DELETE FROM table t1 USING table t2 WHERE t1.id