• Hi

    I was thinking to use MERGE because you are basically merging 2 records. As I of the mentioned in 3 rules, we can delete any of the record, provided it has been merged in the record which will stay.

    So if the IsPrimaryNumber=1 in the record we choose to delete, then the record which stays should have IsPrimaryNumber=1 if it was 0 earlier.

    Pls let me know if I need to provide more elaboration.

    one addition: I basically want the table to finally have the records which I mentioned as output of SELECT. Sorry about confusion.

    Online Trainer For SQL DBA and Developer @RedBushTechnologies with 18 yrs exp.