22,301
社区成员




CREATE TRIGGER UPdateFEB ON ICStockBillEntry
FOR INSERT
AS
if exists (select 1 from inserted a join ICStockBill b on a.FInterID=b.FInterID and b.ftrantype=24)
begin
update ICStockBillEntry set
FEntrySelfB0463 = (case when FUnitID = 88403 then FQty/10000 else FQty end)
FROM ICStockBill a
join ICStockBillEntry b
on a.FInterID=b.FInterID and ftrantype=24 and a.FInterID in (select FInterID from inserted)
end