BrookK
asked on
Replace a string
I have to update a table with the replace function. The table test has a column text.
This column has string 'Invalid ISBN {11111,222,333}'. I have to replace the string in { and } braces with the new variable value.
This column has string 'Invalid ISBN {11111,222,333}'. I have to replace the string in { and } braces with the new variable value.
update test
set text = 'Invalid ISBN { ' + @ISBNlist + ' }'
where !ID = @id.
Can anyone tell me how to use replace in the above update statement?
Thanks,
-B
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys. I implemented Aneesh's suggestion but Pssandhu's suggestion worked well too.
-B
-B
.......and you accepted the other solution
:)
:)
update test
set text = 'Invalid ISBN { ' + @ISBNlist + ' }'
where ID = @id