Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Find & Replace

Quote Reply
Find & Replace
Easy Question? Hard Answer!

I am trying to do a find a replace in a field on a database.

For example is a field i have

"the cow jumped over the moon" in one record and "the moon comes out at night" in another

I want to find each instance of the word moon and replace it with the word sun - how do i do this using mysql monitor?
Best Regards
Marc P Summers
Canterbury City Council
Quote Reply
Re: [MarcPSummers] Find & Replace In reply to
Ok after a bit of RTPT (reading the previous Threads!!) here is my answer

UPDATE events SET url = REPLACE(url, "moon", "sun")
Best Regards
Marc P Summers
Canterbury City Council