## T_ABSENCES_JUSTIFIEES_2

Details
Grants
References
Dependencies
Code

TEXT
    TRIGGER "ARELV3"."T_ABSENCES_JUSTIFIEES_2"
    BEFORE INSERT or update ON absences_justifiees
    FOR EACH ROW
    DECLARE
    BEGIN
    UPDATE etudiants_absences
    SET justification = 'aj'
    WHERE
    pf_groupe = :new.f_groupe
    AND
    pf_edt in (select p_id from edt where to_date(date_jour_edt(annee_civile,semaine,jour),'dd/mm/yyyy') <= to_date(:new.date_fin,'dd/mm/yyyy')
      and to_date(date_jour_edt(annee_civile,semaine,jour),'dd/mm/yyyy') >= to_date(:new.date_debut,'dd/mm/yyyy')) ;
    END;