Skip to content
Advertisement

Update duplicate data with same unique-identifier

I have the following table in my database:

enter image description here

So I want to generate Unique-identifier and Update the UniqueID column as shown below:

enter image description here

If values of UniqueID are the same, then they must have the same Uniqueidentifier. I have tried to write a CTE as below:

But am not getting what am looking for. Very knew to the world of CTEs. What is the best way to get the results am looking for?

Advertisement

Answer

You can try below – if I understand correctly then you need a update join

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement