|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, March 03, 2010 3:35 PM
Points: 969,
Visits: 120
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, March 07, 2010 11:17 AM
Points: 189,
Visits: 126
|
|
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
|
|
|
|
|
SSC Eights!
      
Group: General Forum Members
Last Login: Wednesday, March 03, 2010 3:35 PM
Points: 969,
Visits: 120
|
|
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
|
|
|
|