I just thought that Microsoft would have some way around this to deal with people like me.
2 points:
Your situation should not exist, because you should not have allowed it to. If you assert that a combination of Style,Description,Color are suitable for uniquely identifying a row in the table, then it should be the primary key.. it then becomes IMPOSSIBLE to insert a row having the same Style,Description,Color, so your situation would never come to exist
MS do have a way of dealing with duplicate rows in terms of flattening them into single rows, and it comes as part of an operation to apply a primary key. If there are duplicate values, you remove them by having the DB perform a grouping operation on all rows.
The following is meant for one time op only. Do not use this on a regular basis:
SELECT INTO table2 DISTINCT * FROM table1
DELETE FROM table1
SELECT INTO table1 * FROM table2 [or is the syntax INSERT INTO table1 SELECT * FROM table2 ? I can't remember]
If only some of the columns are used to determine duplication, your first query must be:
SELECT INTO table2 Size,Description,Color,MAX(Size1),MAX(Size2)... FROM table1 GROUP BY Size,Description,Color
There are other options, such as downloading into a client side datatable, scanning the rows and marking some as deleted, but you must appreciate that the concept of "first row" is very woolly: Databases store data in any order they choose, and are not guaranteed to return rows in the order of addition. As such if there is nothing you can specifically order by, you cannot rely that the return order is the addition order, and you'll have to review the rows manually. Be aware that using a group by query as noted above, you must choose your aggregate operations (MAX, SUM, AVG) carefully so as not to end up with a broken set of data i.e. if you cannot tolerate values from different rows being mixed, don't use MAX, because if your rows were:
Large, Jumper, Red, 4, 1
Large, Jumper, Red, 2, 5
You'd end up with this after the de-dupe:
Large, Jumper, Red, 4, 5
Might not be what you want - it's kidna a bed you made and have to lie in, because of no primary key being set up at the start of the db design phase
You can use the technique in your situation: Rather than trying to remove one row, write a query that groups the rows together (using distinct or group by) and insert the grouped row into another table, then delete both rows, and move the new row back