Click here to Skip to main content
14,576,897 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi ,
 
I have A nvarchar value Like This =id1-1,2 ; id2-1,3 ; .......

Id  value
----------
id1  abc
id2  bcd
id3  cdf

now i want nvarchar value abc-1,2;bcd-1,3;

i want return the nvarchar value with replace of id1,id2 values(i have a table id,value)


What I have tried:

please help me. i have no idea. i dont know how to start that query...
Posted
Updated 16-Mar-18 18:20pm
v2
Comments
Richard Deeming 16-Mar-18 17:40pm
   
REPOST
You have already posted this in the database forum:
https://www.codeproject.com/Messages/5501300/Replace-Ids-With-value.aspx[^]
Rate this:
Please Sign up or sign in to vote.

Solution 1

Something like this:
update mytable
set id = replace(id, 'id1', '')
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100