E.g. If a new cost is being added and being assigned to a dept but if that would cause the dept to go over budget I want it not to be allowed.
CREATE OR REPLACE TRIGGER trig_new_cost_limit BEFORE INSERT OR UPDATE OF dept ON costtable FOR EACH ROW WHEN (OLD.dept = NEW.dept) BEGIN --If assigning this cost to dept will cause over budget STOP EXCEPTION END trig_new_cost_limit; / SHOW ERRORS;
Any advice would be great.

New Topic/Question
Reply



MultiQuote


|