Home Forums SQL Server 2005 T-SQL (SS2K5) update command RE: update command
arun.sas
SSChampion
Points: 11831
More actions
November 7, 2009 at 12:08 am
#1076258
Hi,
try this
update a
set a.MemoStatus = (case when (select 1 from MemoDetail b where b.EmployeeId = a.EmployeeId )=1 then 'Y'else 'N' end)
from Employee a