Hi all!

I would like to update many records in a table called "pictures" where I
find a string in the "caption" column.  If the string (e.g. "www.bob.com")
is found, replace it with another string (e.g. "www.bubba.com").
Unfortunately, there is other text in the caption column of these records,
so I can't just do a simple update.  How can I replace a string of text
within a column without destroying the other text in that column?  For my
example, here is a command to find all records with the text string that I'm
looking for:

select id from pictures where caption like '%www.bob.com%';

Now I want to replace the string "www.bob.com" in those records with
"www.bubba.com". One of the records has the following in the caption column:

"There is a party at www.bob.com"

Now I want it to be:

"There is a party at www.bubba.com"

I'm sure there is an easy way to do this.   :-)

Thanks,

Bob


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to