how to update (N-1) records from the N duplicate records in a database table (SQL SERVER 2005)
Background: I am generating a temporary table after comparing and inserting the records from the other two tables.
so the temp table have some records which have some duplicate fields (say: Order Id, Transaction Id etc…) – but are distinct
I have fetch such so called duplicate records but don’t get an idea of how to update N-1 records among these N records.
Any help is appreciated (esp. sample code).
Thanks in advance.
x,y,zare the fields needed to identify the duplicates. This is potentially all of the fields, depending on your definition of duplicate.