RE INSERT ON Delivery for each row
- ERwin Builtin Trigger
- INSERT trigger on DeliveryNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Good Delivery on child insert restrict */
/* ERWIN_RELATION: CHECKSUM = "0001d879", PARENT_OWNER = "", PARENT_TABLE = "Good" _OWNER = "", CHILD_TABLE = "Delivery" C_VERB_PHRASE = "" ;, C2P_VERB_PHRASE = "", _CONSTRAINT = "R_3", FK_COLUMNS = "ID_good" */count (*) INTO NUMROWSGood
/*% JoinFKPK (:% New, Good, "=", "AND") */
: new.ID_good = Good.ID_good; (
/*% NotnullFK (:% New, "IS NOT NULL AND") */= 0
) _application_error (
,
'Cannot insert Delivery because Good does not exist.'
); IF;
/* ERwin Builtin Trigger */
/* Deliverer Delivery on child insert restrict */
/* ERWIN_RELATION: CHECKSUM = "00000000", PARENT_OWNER = "", PARENT_TABLE = "Deliverer" _OWNER = "", CHILD_TABLE = "Delivery" C_VERB_PHRASE = "" ;, C2P_VERB_PHRASE = "", _CONSTRAINT = "R_6", FK_COLUMNS = "Ow_comp" */count (*) INTO NUMROWSDeliverer
/*% JoinFKPK (:% New, Deliverer, "=", "AND") */
: new.Ow_comp = Deliverer.Ow_comp; (
/*% NotnullFK (:% New, "IS NOT NULL AND") */= 0
) _application_error (
,
'Cannot insert Delivery because Deliverer does not exist.'
); IF;
- ERwin Builtin Trigger;
/ TRIGGER tU_Delivery AFTER UPDATE ON Delivery for each row
- ERwin Builtin Trigger
- UPDATE trigger on DeliveryNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Good Delivery on child update restrict */
/* ERWIN_RELATION: CHECKSUM = "0001d0a0", PARENT_OWNER = "", PARENT_TABLE = "Good" _OWNER = "", CHILD_TABLE = "Delivery" C_VERB_PHRASE = "" ;, C2P_VERB_PHRASE = "", _CONSTRAINT = "R_3", FK_COLUMNS = "ID_good" */count (*) INTO NUMROWSGood
/*% JoinFKPK (:% New, Good, "=", "AND") */
: new.ID_good = Good.ID_good; (
/*% NotnullFK (:% New, "IS NOT NULL AND") */= 0
) _application_error (
,
'Cannot update Delivery because Good does not exist.'
); IF;