Posted By

xavsio4 on 07/09/11


sql Oracle etl BODI

Versions (?)

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

 / Published in: PL/SQL

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

  1. SELECT fields, fields, ROW_NUMBER OVER (PARTITION primary key(s) ORDER BY...) seq
  2. FROM TABLE WHERE condition

Report this snippet  

You need to login to post a comment.