I have a table with some duplicate records. The problem is I have to check for more than one field to know if it is truly a duplicate. I need to check if customerID, OrderItem, and SaleDate are all the same. If so I want to remove the duplicates. I drew a table below to try to show what I am talking about. I want to remove one of the Robert records where Widget and SaleDate are duplicated but not the one where the OrderItem and SaleDate change.
CustomerID CustomerName CustomerAddress OrderItem Price QTY SaleDate
1 John 123 Fake Street Doodad 10.00 1 20110101
2 Robert 742 Evergreen Widget 12.50 1 20110202
2 Robert 742 Evergreen Widget 12.50 1 20110202
2 Robert 742 Evergreen Doodad 13.75 1 20110202
3 Igor 1600 Penn Ave doohickey 10.00 1 20110408