I have a table like this on SQL Server:
code description percentage
123 abc 1
123 oke 0
123 cfd 0
234 kde 2
234 kfc 0
234 kfc 0
How can I update the description of all ‘0 percentage’ records to non-zero percentage record for each code group? e.g. the result I’m after is:
code description percentage
123 abc 1
123 abc 0
123 abc 0
234 kde 2
234 kde 0
234 kde 0
Try