All Forums Database
a2kz 16 posts Joined 05/13
09 Oct 2014
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

Raja_KT 1246 posts Joined 07/09
09 Oct 2014

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

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

dnoeth 4628 posts Joined 11/04
09 Oct 2014

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

Dieter

You must sign in to leave a comment.