I know I'm just thinking of the logic all wrong here but how do I achieve the following:
update @table
set column1 = case
when column1 <> ''
then rtrim(column1) + ', ' + rtrim(column2)--if statement here
else rtrim(column2)
end
from @othertable
I basically want to check if rtrim(column 2) = 'value' then replace it with something else. I understand this is within a switch statement, so how would this be acheived?