[ad_1]
For getting output what you need ,first table record you need to de-concatenate, i mean single rows record make multi rows record and then put inner join. then again you need to apply concatenation on result using stuff function in sql server.
2
[ad_2]
solved how to replace values in sql