Delete duplicate rows
Delete duplicate rows. We delete all rows accept one.
Last updated:
Warning: Review and test in a non-production environment before running.
WITH cte AS (
SELECT polisa as b,
row_number() OVER ( PARTITION BY polisa ORDER BY polisa) AS nr
FROM [DATA_PENSION_122015_AMLOT]
)
DELETE cte WHERE nr > 1