销售订单及普通发票打印次数统计显示触发器程序
Create trigger printaudit_SO_SOMain_cdefine15
for insert
as
declare @clid varchar (2)
declare @dlid varchar (40)
set @dlid = (select cCode from inserted)
set @clid = (select count(*) from printaudit where cCode=@dlid and voucherNum=13)
update SaleBillVouch set cdefine15=@clid where SaleBillVouch.cSBVCode=@dlid
set @clid = (select count(*) from printaudit where cCode=@dlid and voucherNum=17)
update SO_SOMain set cdefine15=@clid where SO_SOMain.cSOCode=@dlid
作者:畅捷服务社区 |  时间:2019年01月24日 14:23
对我有用
没有帮助