I have report like this:
I tried to remove the duplicate values in documentno as paymentno column using :
DELETE FROM c_payment pa USING ( SELECT MIN(ctid) as ctid, pa.documentno FROM c_payment pa GROUP BY pa.documentno HAVING COUNT(*) > 1 ) b WHERE pa.documentno = b.documentno AND pa.ctid <> b.ctid) documentno
but it's still not working, any other advice on what method should I use?
You should remove the last closing brace together with the word documentno.
documentno
1.4m articles
1.4m replys
5 comments
56.9k users