Strategy to identify duplicates in an ETL context (for example)


/ Published in: PL/SQL
Save to your folder(s)

This sql statement enables to detect duplicates entries over a key and creates a seq column which says which one is the sequence of the duplicates. This way you can take only the seq = 1 and still be able to identify all duplicates


Copy this code and paste it in your HTML
  1. SELECT fields, fields, ROW_NUMBER OVER (PARTITION primary key(s) ORDER BY...) seq
  2. FROM TABLE WHERE condition

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.