Hi,@Murari Ram
Welcome to Microsoft T-SQL Q&A Forum!
Please check this:
select code,STUFF(code,charindex( ',', code, (charindex( ',', code) + 1))+1,
charindex( ',', code, (charindex( ',', code, (charindex( ',', code) + 1)) + 1))-
charindex( ',', code, (charindex( ',', code) + 1))-1
,'test_value')as Update_Coulumn from #temp
Tip: The three different charindex( ',', code, (charindex( ',', code) + 1)) here is to calculate the position of the comma.
Best regards,
Bert Zhou
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.