Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating email address

Status
Not open for further replies.

mossbs

Programmer
Aug 19, 2008
102
GB
hey guys,

One of the companies that are a member of the org i work for have changed their name.. thus their email address has changed..... is there anyway to update these in bulk....

ie... something along the lines of (NB i know this doesnt work.. but may expalin it better)

update email
set right(email_address,14) = @newemailaddress.com

any help greatly appreciated.

cheers guys

dan.

 
Hi.

First of all backup your data. Than you can use REPLACE():

Code:
select replace('myAccount@e-mail.com','e-mail.com','newe-mail.com')
returns
myAccount@newe-mail.com

For UPDATE it could work like:
Code:
update yourtable set email=replace(email,'e-mail.com','newe-mail.com')
 
spot on dude! cheers...

knew it would be something simple i was missing!!

cheers again mate!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top