感觉触发器的语法存在一些问题, 我们改造了一下,如下SQL供参考:
create trigger jf
on ICMORpt
for insert,update
as
begin
update t1 set t1.fheadselfj1111=t2.fentryselfj1144/t2.fentryselfj1146
from ICMORpt t1,(select FInterID, sum(fentryselfj1144) as fentryselfj1144,sum(fentryselfj1146) as fentryselfj1146 from ICMORptEntry group by FInterID) t2
where t1.FInterID=t2.FInterID and t2.fentryselfj1146<>0
end
以上回复供参考,如有任何疑问或建议,请即时回复交流,感谢您对金蝶社区的支持!