January 3, 2009 at 9:28 pm
Comments posted to this topic are about the item Yet Another Deleting Duplicate Records (in-place)
January 14, 2009 at 10:01 pm
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
January 15, 2009 at 1:19 pm
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
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy