My inventory needs limitations. I am supposed to make sure my inventory quantity never exceeds 1000 for my main warehouse. All excess units are sent to an external storage site and tracked separately. I need to write a trigger for the "ProductInventory" table to make sure inventory cannot exceed 1000 units when there is an update.
CREATE TRIGGER tgrExcessInventory
ON production.productinventory
AFTER UPDATE
AS
BEGIN
(This is where I get lost in the sql statement I need to make to ensure my limit is not exceeded.)
What sort of language do I need to make this trigger cap at 1000?