I could use the same thing... just looking through the documentation there
is a replace() function. Maybe do a backup/restore to a test database before
doing this on your live system...

UPDATE `tablename` SET `fieldname`=REPLACE(tablename.fieldname,'US-
Complete','US Complete') WHERE `fieldname` LIKE '%US- Complete%';





-----Original Message-----
From: Brian Dunning [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 5 September 2007 10:42 AM
To: mysql@lists.mysql.com
Subject: Editing fields in bulk

I have a column where I need to replace all instances of the text "US- 
Complete" (contained within a long sentence) with "US Complete".  
There are probably 50 or 100 of them. I'm really scared to do it  
since I can't risk screwing up that column - what's the correct syntax?

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


No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.485 / Virus Database: 269.13.5/989 - Release Date: 4/09/2007
5:54 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.485 / Virus Database: 269.13.5/989 - Release Date: 4/09/2007
5:54 PM
 


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

Reply via email to