Beruflich Dokumente
Kultur Dokumente
Code (SQL):
SELECT
SUM (absence_days)
INTO total_abs
FROM per_absence_attendances paa,
per_absence_attendance_types paat
WHERE paa.person_id = p_person_id
AND paa.absence_attendance_type_id = paat.absence_attendance_type_id
AND (p_from_date BETWEEN paa.date_start AND paa.date_end OR p_to_date BETWEEN
paa.date_start AND paa.date_end );
p_person_id, p_from_date, p_to_date are the parameters to be passed from the fast
formula
2) Add the call to above function in BG_ABSENCE_DURATION formula and check the
tot_abs returned value;
If > 0 then there's overlapping.