Forum Moderators: open
reate trigger InventoryUpdateTriggerTRG on inventory
for update
as
declare
@myInventoryID as integer,
@myQTY as integer;
begin
if update (stockqty)
begin
if inserted.stockqty<0
begin
rollback transaction
print ' not enough goodies to go around.'
print ' We might want to re order'
end
end
end