更新SQL抛出错误中的语句

时间:2016-08-02 19:42:27

标签: sql-server

 update t1
set t1.Act_flg='N'
from STG_EmployeeMaster t1
where t1.GPN NOT IN (#Temp_EmployeeMaster.GPN) t2

获取错误:'t2'附近的语法不正确。

1 个答案:

答案 0 :(得分:1)

update t1
set t1.Act_flg='N'
from STG_EmployeeMaster t1
where t1.GPN NOT IN (select GPN from #Temp_EmployeeMaster)