34,588
社区成员
发帖
与我相关
我的任务
分享
update u1
set u1.FConsignPrice=0,u1.FEntrySelfB0159=0,u1.FNote='保用'
from icstockbillentry u1,inserted i
where u1.finterID=i.finterID and u1.fentryID=i.fentryID
end
CREATE TRIGGER t_Icstocktrigger
ON icstockbillentry
FOR INSERT
AS
BEGIN
UPDATE u1
SET u1.FConsignPrice = 0,
u1.FEntrySelfB0159 = 0,
u1.FNote = '保用'
FROM icstockbillentry u1,INSERTED i
WHERE u1.finterID = i.finterID
AND u1.fentryID = i.fentryID
AND ISNULL(i.FEntrySelfB0169, 0)=20273
END
update icstockbillentry u1
set FConsignPrice = 0 , FEntrySelfB0159 = 0 , FNote = '保用'
from icstockbillentry u1 , inserted i
where u1.finterID = i.finterID and u1.fentryID = i.fentryID
update u1
set u1.FConsignPrice=0,u1.FEntrySelfB0159=0,u1.FNote='保用'
from icstockbillentry u1,inserted i
where u1.finterID=i.finterID and u1.fentryID=i.fentryID
create trigger t_Icstocktrigger on icstockbillentry
for insert
as
begin
declare @SanFitemID int
set @SanFitemID=cast((select isnull(FEntrySelfB0169,0) from inserted) as int)
if @SanFitemID=20273
begin
update icstockbillentry
set u1.FConsignPrice=0,u1.FEntrySelfB0159=0,u1.FNote='保用'
from icstockbillentry u1,inserted i
where u1.finterID=i.finterID and u1.fentryID=i.fentryID
end
end