|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, April 18, 2013 2:36 PM
Points: 1,185,
Visits: 288
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, April 18, 2013 6:44 AM
Points: 194,
Visits: 198
|
|
Peter,
You can do it with CTE like this
WITH x As (select row_number() over (partition by id1, id2 order by id2) nr FROM MyTab) delete FROM x where nr > 1
Thanks, Oded
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, April 18, 2013 2:36 PM
Points: 1,185,
Visits: 288
|
|
Thanks, Oded.
Unfortunately the CTE method does not work with SQL 2000. Last year I needed to cleanup hundreds tables in order to introduce primary keys, before 2000 - 2005 conversion and my method worked pretty well.
Regards, Peter
|
|
|
|