Re: [GENERAL] Removing duplicates

2013-07-10 Thread Ketana Patel
Hi, You can try following query on test database to remove duplicates. DELETE FROM isi.rcited_ref a     WHERE a.ctid <> (SELECT min(ctid) FROM isi.rcited_ref b   WHERE a.rart_id = b.rart_id       AND a.r9 = b.r9   AND a.ra = b.ra   AND a.ry = b.ry   AND a.rw =

Re: [GENERAL] Removing duplicates

2013-07-10 Thread Giuseppe Broccolo
Dear Johann, I tried (with PostgreSQL 9.2) to run the two DELETE statements you describe in your mail (the first based on the "id" field, the second on the ctid) and they work! I have to point out that if you use the DELETE based on the "id" field YOU'LL DELETE ALL RECORDS having at least one