sql server - Replacing a specific substring with another substring in a string in SQL stored procedure -


I have the following requirements: I passed a command parameter @ myststring near 'ABC DEF' as a stored procedure I am here. In the stored procedure level, I need to replace the object DEF with XYZ to get string 'ABC XYZ'. How can I do this?

Thanks NLV

Simply use the function within T-SQL

  declare @myOriginalString varchar (50) set @myOriginalString = 'ABC DEF' declared @myfindstring varchar (50) @myfindstring set @def declare 'my REPrestrestre varchar (50) set @myreplaceString = Select 'XYZ' (@ myOriginalString, @ myFindString, @MyReplaceString)  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -