Row level Duplicate Record elimination

Database
Enthusiast

Row level Duplicate Record elimination

Hi All,

I want to remove the complete row level duplicates from multiple source while inserting to the target table.

I cant do UNION or I can create a SET target table.

Which approach will have better performance ?

Thanks,

Ambuj

2 REPLIES
Enthusiast

Re: Row level Duplicate Record elimination

You have not shared much detail :). sample data..... what you have and what you want as output.

You can think of  qualify row_number() over(partition by mmm, nnnn order by mmm, nnnn asc...desc)=1

or from subquery group by having count(*)=1

Senior Apprentice

Re: Row level Duplicate Record elimination

Hi Ambuj,

SET tables should perform best unless the PI is very non-unique.