There are duplicates of a specific field in a sql database. If the selected row has a duplicate in the code field then I want to select one of them as 'a' as field2 and one of them as 'b' as field2.
something like: case when the code field is a duplicate in the database, then select one of the duplicates as 'a' and the other as 'b' as field2 . there is no primary key in the table.
What would be the best way to accomplish this?
Thank you.