create trigger t_tjc on ICStockBill
for insert
as
set nocount on
BEGIN
DECLARE @FInterID int
select @FInterID=FInterID from inserted
if exists(select * from ICStockBill where FInterID=@FInterID)
update A
set A.FQty=A.FQty-B.FQty
from tjc A
left outer join t_ICItemCore E on A.FNumber=E.FNumber
left outer join ICStockBillEntry B on E.FItemID=B.FItemID
left outer join ICStockBill C on B.FInterID=C.FInterID
where B.FInterID=@FInterID and B.FSourceTranType=85 and B.FPPBomEntryID=0
end
set nocount off
触发器问题,同一入库单据一单击保存,就会更新库存,郁闷,在K3的入库单据那,一单击就这样,郁闷,不知道咋回事来着,请教高人