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
Try this: