View Full Version : Need query to part change data in each row.

11-23-2011, 09:47 AM
I have a MySQL table with around 20,000 rows.
One of the fields in each row contains url data. I need to change only part of the url from each row, leaving the rest intact. Is it possible to do?

all rows currently: http://www.xxx.uniqueID.com

now need to be: http://www.zzz.uniqueID.com

Many thanks for any help, it's appreciated.


11-23-2011, 10:46 AM
Just to let you know, I found what I needed -

update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');

thanks anyway

11-23-2011, 12:57 PM
rather simple right? :)
Thanks for taking the time to post your solution, it will help others who come across your thread that are having problems solving in a similar situation.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum