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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Partial String Update

Status
Not open for further replies.
Mar 4, 2003
47
0
0
US
I need to make a mass change to a field that contains an email address. Values are standard format (joe@company.com, sally@company.com, etc). I need to change all the endings to @newcompany.com. The table holds about 500 records so I would like to write an update statement to do this.

Not being a very proficient SQL User though I'm not sure how to just replace the company.com part. Help....
 
Replace is your friend.

Code:
Update Table
Set    EmailAddress = Replace(EmailAddress, '@company.com', '@newcompany.com')

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top