标题:SQL触发语句出错
只看楼主
vivazheng
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2019-3-22
 问题点数:0 回复次数:0 
SQL触发语句出错
Create trigger vivapur   
on                        
PU_AppVouchs              
for                       
update                    
as                        
begin   
               
update PU_AppVouchs set cDefine23=(select cInvCode,cWhCode, SUM (ItemId) as 汇总
 from CurrentStock
 where cWhCode='30'   
GROUP BY cInvCode,ItemId,cWhCode)        

from                                                      
CurrentStock,PU_AppVouchs,PU_AppVouch
           
where                                                      
PU_AppVouchs.cInvCode=CurrentStock.cInvCode               
and
PU_AppVouchs.id=PU_AppVouch.id
and
CurrentStock.cWhCode='30'
end
问下这个触发语句应该怎么写才对。

[此贴子已经被作者于2019-9-10 09:02编辑过]

搜索更多相关主题的帖子: 触发 出错 语句 SQL where 
2019-09-07 08:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-496727-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.050625 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved