Update Query

  • Thread starter Thread starter HRMAC
  • Start date Start date
H

HRMAC

I need to update the domain name in several email addresses.

Ex: (e-mail address removed) to be (e-mail address removed)

I only need to update the domain name.
 
One method

UPDATE [SomeTable]
SET [EmailAddress] = Replace([EmailAddress],"@abc.com","@abcdef.com")
WHERE [EmailAddress] like "*@ABC.Com"

OR

UPDATE [SomeTable]
SET [EmailAddress] = Left([EmailAddress],Instr(1,[EmailAddress],"@")) &
"abcdef.com")
WHERE [EmailAddress] like "*@ABC.Com"




John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top