); IF;
ERwin Builtin Trigger;
/TRIGGER tD_Postavka AFTER DELETE ON Postavka for each row
ERwin Builtin Trigger
DELETE trigger on PostavkaNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Postavka Sklad on parent delete restrict */
/* ERWIN_RELATION: CHECKSUM = «0000e1a0», 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 NUMROWSSklad
/*% JoinFKPK (Sklad,:% Old, В»=В», В»ANDВ») * /. nom_post =: old.nom_post AND.post_no =: old.post_no; (NUMROWS> 0 ) _application_error (
,
'Cannot delete Postavka because Sklad exists.'
); IF;
ERwin Builtin Trigger;
/TRIGGER tU_Postavka AFTER UPDATE ON Postavka for each row
ERwin Builtin Trigger
UPDATE trigger on PostavkaNUMROWS INTEGER;
/* ERwin Builtin Trigger */
/* Postavka Sklad on parent update restrict */
/* ERWIN_RELATION: CHECKSUM = «0002289b», PARENT_OWNER = »», PARENT_TABLE = «Postavka» _OWNER = »», CHILD_TABLE = «Sklad» C_VERB_PHRASE = »», C2P_VERB_PHRASE = »», _CONSTRAINT = «R_27», FK_COLUMNS = «nom_post» «post_no» */
/*% JoinPKPK (:% Old,:% New, В»<>В», В»ORВ») */
: old.nom_post <>: new.nom_post OR
: old.post_no <>: new.post_nocount (*) INTO NUMROWSSklad
/*% JoinFKPK (Sklad,:% Old, В»=В», В»ANDВ») * /. nom_post =: old.nom_post AND.post_no =: old.post_no; (NUMROWS> 0 ) _application_error (
,
'Cannot update Postavka because Sklad exists.'
); IF; IF;
/* ERwin Builtin Trigger */
/* Postavshiki Postavka on child update restrict */
/* ERWIN_RELATION: CHECKSUM = «00000000», PARENT_OWNER = »», PARENT_TABLE = «Postavshiki» _OWNER = »», CHILD_TABLE = «Postavka» C_VERB_PHRASE = »», C2P_VERB_PHRASE = »», _CONSTRAINT = «R_21», FK_COLUMNS = «post_no» */count (*) INTO NUMROWSPostavshiki
/*% JoinFKPK (:% New, Postavshiki, В»=В», В»ANDВ») */
: new.post_no = Postavshiki.post_no; (
/*% NotnullFK (:% New, В»IS NOT NULL ANDВ») */= 0
) _application_error (
,
'Cannot update Postavka because Postavshiki does not exist.'
); IF;
ERwin B...