Jack Seaman
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.e du','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
Update employees2
Set email = (SELECT REPLACE(email,'mail.xxxx.e
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.