uiltin Trigger;
/TRIGGER tD_Postavshiki AFTER DELETE ON Postavshiki for each row
ERwin Builtin Trigger
DELETE trigger on PostavshikiNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Postavshiki Postavka on parent delete restrict */
/* ERWIN_RELATION: CHECKSUM = «0000d5f0», PARENT_OWNER = »», PARENT_TABLE = «Postavshiki» _OWNER = »», CHILD_TABLE = «Postavka» C_VERB_PHRASE = »», C2P_VERB_PHRASE = »», _CONSTRAINT = «R_21», FK_COLUMNS = «post_no» */count (*) INTO NUMROWSPostavka
/*% JoinFKPK (Postavka,:% Old, В»=В», В»ANDВ») * /. post_no =: old.post_no; (NUMROWS> 0) _application_error (
,
'Cannot delete Postavshiki because Postavka exists.'
); IF;
ERwin Builtin Trigger;
/TRIGGER tU_Postavshiki AFTER UPDATE ON Postavshiki for each row
ERwin Builtin Trigger
UPDATE trigger on PostavshikiNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Postavshiki Postavka on parent update restrict */
/* ERWIN_RELATION: CHECKSUM = «0000fb42», PARENT_OWNER = »», PARENT_TABLE = «Postavshiki» _OWNER = »», CHILD_TABLE = «Postavka» C_VERB_PHRASE = »», C2P_VERB_PHRASE = »», _CONSTRAINT = «R_21», FK_COLUMNS = «post_no» */
/*% JoinPKPK (:% Old,:% New, В»<>В», В»ORВ») */
: old.post_no <>: new.post_nocount (*) INTO NUMROWSPostavka
/*% JoinFKPK (Postavka,:% Old, В»=В», В»ANDВ») * /. post_no =: old.post_no; (NUMROWS> 0) _application_error (
,
'Cannot update Postavshiki because Postavka exists.'
); IF; IF;
ERwin Builtin Trigger;
/TRIGGER tI_Sklad BEFORE INSERT ON Sklad for each row
ERwin Builtin Trigger
INSERT trigger on SkladNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Postavka Sklad on child insert restrict */
/* ERWIN_RELATION: CHECKSUM = «0001007f», PARENT_OWNER = »», PARENT_TABLE = «Postavka» _OWNER = »», CHILD_TABLE = «Sklad» C_VERB_PHRASE = »», C2P_VERB_PHRASE = »», _CONSTRAINT = «R_27», FK_COLUMNS = «nom_post» «post_no» */count (*) INTO NUMROWSPostavka
/*% JoinFKPK (:% New, Postavka, В»=В», В»ANDВ») */
: new.nom_post = Postavka.nom_post AND
: new.post_no = Postavka.post_no; (
/*% NotnullFK (:% New, В»IS NOT NULL ANDВ») */= 0
) _application_error (
,