Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6700463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:49:04+00:00 2026-05-26T06:49:04+00:00

Our company recently changed our email address. Only the part after the @ changed.

  • 0

Our company recently changed our email address. Only the part after the @ changed. For example, if your email was name@oldEmail.com it is now name@newEmail.com.

In our database, there is a column that stores all of emails. I need to convert all the old emails to the new emails.

I have this for my SQL:


update Contacts set EmailAddress1=() where EmailAddress1 like '%oldEmail.com%';

The where part should pull all the rows with the old email address, but I am not sure how to set them to the new one. I need to do some string manipulation. Is there a simple way to do this?

It is Microsoft SQL Server 2008 R2

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:49:05+00:00Added an answer on May 26, 2026 at 6:49 am

    Try this:

    update Contacts 
    set EmailAddress1 = REPLACE(EmailAddress1,'@oldEmail.com','@newEmail.com') 
    where EmailAddress1 like '%oldEmail.com';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our company has recently switched over to using After the Deadline for our spell
Me and two other guys recently started our own web development company. We each
At my company, we recently switched from VC9 to VC10. We migrated our projects
Recently a new co-op was hired at our company and has been tasked to
We've recently moved our company website to a new host. It is an ASP.NET
In our company we tend to use views and stored procedures. We've recently started
So we have recently started developing applications for the iPad for our company. Unfortunately
Recently a couple of WCF services have been introduced to our company's API. There
In our company, just until recently, we were not using namespaces because some compilers
Our company recently began creating CVS branches to mark each release. Formerly we had

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.