SELECT
per.person_number,
apae.per_absence_entry_id,
abs.absence_type_id,
abs.name AS absence_type,
TO_CHAR(apae.start_date, 'DD-MON-YYYY', 'NLS_DATE_LANGUAGE = AMERICAN') AS start_date,
TO_CHAR(apae.end_date, 'DD-MON-YYYY', 'NLS_DATE_LANGUAGE = AMERICAN') AS end_date,
apae.duration
FROM
ANC_PER_ABS_ENTRIES apae,
PER_PERIODS_OF_SERVICE pps,
PER_ALL_PEOPLE_F per,
ANC_ABSENCE_TYPES_VL abs
WHERE
apae.period_of_service_id = pps.period_of_service_id
AND apae.absence_type_id = abs.absence_type_id
AND pps.person_id = per.person_id
AND TRUNC(SYSDATE) BETWEEN abs.effective_start_date AND abs.effective_end_date
AND TRUNC(SYSDATE) BETWEEN per.effective_start_date AND per.effective_end_date
AND per.person_number = '11111111'
ORDER BY
per.person_number
I hope this blog post was helpful for you. If you have any questions or feedback, please leave a comment below.