## T_ETUDIANTS_ABSENCES_2

Code
Dependencies
Details

Name | Value
--- | ---
OWNER | AREL
TRIGGER_NAME | T_ETUDIANTS_ABSENCES_2
TRIGGER_TYPE | BEFORE EACH ROW
TRIGGERING_EVENT | INSERT
TABLE_OWNER | AREL
BASE_OBJECT_TYPE | TABLE
TABLE_NAME | ETUDIANTS_ABSENCES
COLUMN_NAME | null
REFERENCING_NAMES | REFERENCING NEW AS NEW OLD AS OLD
WHEN_CLAUSE | null
STATUS | ENABLED
DESCRIPTION | t_etudiants_absences_2 BEFORE INSERT ON etudiants_absences FOR EACH ROW
ACTION_TYPE | PL/SQL
TRIGGER_BODY | DECLARE compte number; BEGIN SELECT COUNT(*) INTO compte FROM absences_justifiees aj WHERE aj.f_groupe = :new.pf_groupe AND (SELECT e.jour FROM edt e WHERE e.p_id = :new.pf_edt)+1 BETWEEN to_char(aj.date_debut, 'D') AND to_char(aj.date_fin, 'D') AND (SELECT e.semaine FROM edt e WHERE e.p_id = :new.pf_edt) BETWEEN to_char(aj.date_debut, 'WW') AND to_char(aj.date_fin, 'WW'); IF (compte != 0) THEN :new.justification := 'aj'; END IF; END;
CREATED | 2011-09-02 09:27:09.0
LAST_DDL_TIME | 2011-09-02 09:27:09.0