|    
   
Thursday, March 11, 2010
Most recent blog entries
Delete Duplicates
Trigon Blue TSQL Blog By Dejan Sunderic on 12/10/2007 10:15 AM

Imagine a table (Dim) with surrogate identifier (SID) and with duplicate records that share same values on alternate key (Key1, Key2).

 The soluton is "set-oriented" and therefore very fast even for millions of records. It is also nice that it does not use Temp table.

-- delete duplicate records from Dim
-- there are records with duplacates on alternate key (Key1+ Key2)

delete from Dim
where SID < ( < ...

Comments (0) More...


TSQL Blog

TSQL Blog
You must be logged in and have permission to create or edit a blog.

TSQL Blog

TSQL Blog

Copyright (C) 2007 Trigon Blue Inc.     |    Privacy Statement    |    Terms Of Use