Carlos, I think this does what you want: (untested though)
UPDATE identities SET email=replace(email, 'mail.', '') WHERE email like '%mail.iamghost.com' Regards, Nathan -----Original Message----- From: Carlos Williams [mailto:[email protected]] Sent: Wednesday, July 29, 2009 1:58 PM To: [email protected] Subject: Properly Use Replace Command I know this seems very basic and I checked Google before posting but it appears that many of the manuals / guides online reference something a bit more extreme than what I am looking for. I am searching a table called 'identities' and in that table there is a column called 'email'. Some people have the wrong email address listed so I would like to replace the invalid entry '[email protected]' to the correct value '[email protected]' mysql> select email from identities where email like ('%mail.iamghost.com'); I ran the above command to show me all the people with the invalid email address. Now I am just looking for a way to change mutiple incorrect entries in one command. Is this possible in MySQL? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[email protected]
