How do I do a simple ‘Find and Replace” in MsSQL?

Question :

How do I do a simple ‘Find and Replace” in MsSQL?,

Answer :

Question is pretty self explanitory. I want to do a simple find and replace, like you would in a text editor on the data in a column of my database (which is MsSQL on MS Windows server 2003)

,

The following query replace each and every a character with a b character.

UPDATE       YourTable  SET       Column1 = REPLACE(Column1,'a','b')  WHERE       Column1 LIKE '%a%'  

This will not work on SQL server 2003.

That’s the answer How do I do a simple ‘Find and Replace” in MsSQL?, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Read More  Debugging: IE6 + SSL + AJAX + post form = 404 error

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you