Link to home
Start Free TrialLog in
Avatar of Jack Seaman
Jack SeamanFlag for United States of America

asked on

SQL Update Statement

I am trying to update a column by removing 'mail' from the email addresses.  I use this:

Update employees2
Set email = (SELECT REPLACE(email,'mail.xxxx.edu','xxxx.edu')
from employees2);

However, I get this error message:
Msg 512, Level 16, State 1, Line 1
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
The statement has been terminated.

How can I fix
ASKER CERTIFIED SOLUTION
Avatar of Steve Wales
Steve Wales
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial