Re: Changing part of field

2002-01-04 Thread Carl Troein
Greg Peretti writes: > I have a database that has a emailaddress field. A large number of the > entries are from home.com, Excite's ISP. Since Excite is out of > business, Comcast is converting them all to comcast.net next month. > > Is there a simple way to change all home.coms to comcast.nets

Re: Changing part of field

2002-01-04 Thread Michael Stassen
You want to change any occurrences of [EMAIL PROTECTED] to [EMAIL PROTECTED] in column emailaddress, right? Assuming your table is named 'mytable', it looks to me like you could use UPDATE mytable SET emailaddress=REPLACE(emailaddress,'@home.com','@comcast.net'); See

Re: Changing part of field

2002-01-04 Thread Robert Lucier
I don't think you can do it with a single command. One fairly easy way is to run a command to generate the sql that will do the update. So your first statement will be something like: select concat( 'update set emailaddress=''', emailaddress, '''where =', and with your values. Output the re

Changing part of field

2002-01-04 Thread Greg Peretti
I have what I hope is a simple problem, but being somewhat a novice at MySQL, it is a bit beyond me. I have a database that has a emailaddress field. A large number of the entries are from home.com, Excite's ISP. Since Excite is out of business, Comcast is converting them all to comcast.net next