I have a row that provides me values like shown below:
ClubbedValues
-----------------------------------------------------
561#557, 562#558, 563#559, 561#560, 562#560
581#578, 581#579, 581#580
561#557, 562#558, 562#559, 563#560
I have a master table where I have text values against these id’s. For example:
Id TextValue
-----------------------------------------------------
561 Value1
562 Value2
563 Value3
564 Value4
565 Value5
Now I somehow desire the following output:
ClubbedValues
-----------------------------------------------------
Value1#Value107, Value2#Value108, Value3#Value109 etc..
Where both the text values are mapped somewhere in the master table.
I hope you got the question….
Any help will be appreciated.
Thank you.
You can do this using a table variable and a loop over all values you would need to replace.