
CREATE TRIGGER C_rule_trigger
   BEFORE UPDATE ON C_rule
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER C_discount_trigger
   BEFORE UPDATE ON C_discount
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER C_customer_trigger
   BEFORE UPDATE ON C_customer
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER M_parts_trigger
   BEFORE UPDATE ON M_parts
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER M_workorder_trigger
   BEFORE UPDATE ON M_workorder
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER O_customer_trigger
   BEFORE UPDATE ON O_customer
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER O_item_trigger
   BEFORE UPDATE ON O_item
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER S_supplier_trigger
   BEFORE UPDATE ON S_supplier
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER S_supp_component_trigger
   BEFORE UPDATE ON S_supp_component
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER S_purchase_order_trigger
   BEFORE UPDATE ON S_purchase_order
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

CREATE TRIGGER S_purchase_orderline_trigger
   BEFORE UPDATE ON S_purchase_orderline
   FOR EACH ROW
   WHEN (new.oc_version = old.oc_version)
DECLARE
BEGIN
   :NEW.oc_version := :OLD.oc_version + 1;
END;
/

