SET ANSI_NULLS ON
GO
The SET QUOTED_IDENTIFIER ON
GO
CREATE the TRIGGER [dbo] [Bibie_01] ON [dbo] [ICStockBillEntry]
FOR Update
AS
The BEGIN
Update ICStockBillEntry set FConsignPrice=t2. FConsignPrice * t4 FExchangeRate, FConsignAmount=(t2) FConsignPrice * t4) FExchangeRate). * t2 FQty
The from ICStockBill t1 inner join
ICStockBillEntry t2 on t1. FInterID=t2. FInterID inner join
T_Organization t3 on t1. FSupplyID=t3. FItemID inner join
T_Currency t4 on t3. FCyID=t4. FCurrencyID
Where a t1. FSupplyID='12826' and
T1. FTranType='21'
ICStockBillEntry table fields is as follows:
ICStockBill table fields is as follows:
Want to write a trigger, update only ICStockBill current receipt number of data in the table, not update all ICStockBill table data
CodePudding user response:
The inner join ICStockBillEntry into inner join insertedCodePudding user response:
Is there a big in!