1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| create or replace TRIGGER RUE_AFT_INS
AFTER INSERT ON RUE
FOR EACH ROW
DECLARE
ov_id_rue rue.id_rue%TYPE;
ov_CD_CODCMU_RUE rue.CD_CODCMU_RUE%TYPE;
ov_CD_CODDPT_RUE rue.CD_CODDPT_RUE%TYPE;
ov_codvoi_rue rue.cd_codvoi_rue%TYPE;
ov_lb_rue rue.lb_rue%TYPE;
ov_ref_ext_rue rue.ref_ext_rue%TYPE;
BEGIN
ov_id_rue := :NEW.id_rue;
Ov_Cd_Codcmu_Rue := :New.Cd_Codcmu_Rue;
Ov_Cd_Coddpt_Rue := :New.Cd_Coddpt_Rue;
ov_codvoi_rue := :NEW.CD_CODVOI_RUE;
ov_lb_rue := :NEW.lb_rue;
ov_ref_ext_rue := :NEW.ref_ext_rue;
/* Insertion de la rue dans 2 autres bases par dblink */
INSERT INTO RUE@GENASEE VALUES (ov_id_rue, Ov_Cd_Codcmu_Rue, Ov_Cd_Coddpt_Rue, ov_codvoi_rue,ov_lb_rue, ov_ref_ext_rue, 'O');
INSERT INTO RUE@GENINSE VALUES (ov_id_rue, Ov_Cd_Codcmu_Rue, Ov_Cd_Coddpt_Rue, ov_codvoi_rue,ov_lb_rue, ov_ref_ext_rue, 'O');
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
END; |
Partager