做了一个触发器。老是提示错误。请各位多指点
create trigger trigger_picon dbo.newmoo_case_cgxd
for insert
as
BEGIN
DECLARE @productnum int SELECT @productnum = productnum FROM INSERTED
DECLARE @ischeck int SELECT @ischeck = ischeck FROM INSERTED
Update dbo.newmoo_case set dbo.newmoo_case.cs1 =sum(newmoo_case_cgxd.productnum) from dbo.newmoo_case_cgxd inner join newmoo_case on dbo.newmoo_case.id = dbo.newmoo_case_cgxd.caseid and newmoo_case_cgxd.ischeck =3
end
错误内容如下
消息 157,级别 15,状态 1,过程 trigger_pic,第 11 行
聚合不应出现在 UPDATE 语句的集合列表中。
[此贴子已经被作者于2017-3-29 15:54编辑过]