HKFuey
asked on
SQL Trigger Syntax
I have this trigger: -
One of the fields inserted is 'WarehouseToUse' (Char(2)), If the entry in this field is 'B ' I don't want the trigger to fire. Does anyone know the syntax?
UPDATE dbo.InvMaster
SET StockOnHold = 'F'
, StockOnHoldReason = 'NEW'
WHERE StockCode in (SELECT StockCode FROM Inserted);
One of the fields inserted is 'WarehouseToUse' (Char(2)), If the entry in this field is 'B ' I don't want the trigger to fire. Does anyone know the syntax?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
WHERE StockCode in (SELECT StockCode FROM Inserted WHERE WarehouseToUse <> 'B ');
Thanks for super quick response!!