I have two tables, UserStatus and User.
UserStatus has two fields: Username,Status
User has two fields Username, Deleted
This is the query I'm using
Update users
set deleted = '1'
where username = (select username
from tempDUDPIVOT
where status = 'inactive')
but get the error:
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
I've tried a number of variations but can't figure out the solution... I have a feeling its very obvious.
Your help is appreciated.
Thanks.