SQL Server, 2000 - How to delete duplicated rows if the primary key is multiple columns
Posted on 2007-11-27
I have got a table ÃƒÂ¢Ã‚Â€Ã‚ÂœTradeÃƒÂ¢Ã‚Â€Ã‚Â that has a combined primary key ÃƒÂ¢Ã‚Â€Ã‚ÂœDeal_Number,Order_Number,ValueDateÃƒÂ¢Ã‚Â€Ã‚Â
While setting the primary key, the table already had data, which was duplicated for some dates.
How may I execute a statement that deletes all duplicates?
Note: I need to delete extra duplicates only and not all data. i.e. if rows of 01/12/2000 are duplicated 3 times, I need to delete them 2 times and keep 1 instance of them.
Thanks in advance,