Here’s a MySQL query fuction that’s easy to forget about: REPLACE. Let’s say I have a bunch of records in a field with http://www and want to quickly change all to http://. Here’s the syntax to update:
UPDATE tdurl_1 SET URL = REPLACE(URL, ‘http://www.tdurl.com/’,'http://tdurl.com/’);

I been trying to find the correct syntax to nest the REPLACE statement. So far I’ve not had much luck, any ideas? Tks!!!
on July 31st, 2008 at 1:48 pm | #Link Comment