December 6, 2013 at 6:27 am
Hi
I have a requirement where I have replace two different strings with another string.
i.e. if there is 'Brigade Army or "Brigades Armies' in the result set, it should be replaced with 'BAY'.
How can I achieve it using REPLACE or any other way?
December 6, 2013 at 7:08 am
Nested replace will do that.
REPLACE(REPLACE(SourceString,'Brigade Army','BAY'),'Brigades Armies','BAY')
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
December 11, 2013 at 2:19 am
Thanks Gail, thanks for your reply. That has worked for me.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply