什么情况
update A01HIS set rs=
select count(a0188) from a01 ,deptcode
where a01.dept_id=deptcode.dept_id
and a0191 ='在职人员'
and CONVERT(char(6),A0144,112)<='201311'
消息 156,级别 15,状态 1,第 2 行
关键字 'select' 附近有语法错误。
------解决方案--------------------UPDATE A01HIS
SET rs = ( SELECT COUNT(a0188)
FROM a01 ,
deptcode
WHERE a01.dept_id = deptcode.dept_id
AND a0191 = '在职人员'
AND CONVERT(CHAR(6), A0144, 112) <= '201311'
)