sql - Replace multiple instances of exact word in a string -


i have address column in table want replace word. query replaces partial matches:

select replace('the bthe them', 'the', 'abc') 

for above example, desired output should be:

abc bthe abc them 

but output is:

abc babc abc abcm 

how solve this?

select replace(' ' + column + ' ', ' ', ' abc ') table 

output:

abc bthe abc them  

i assuming selecting table when replacing values in strings. 'column' column in table selecting contains value wanting use replace function on.


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -