SELECT paa.person_id,
paa.date_start,
paa.date_end,
time_start,
time_end,
ROUND (
( ( (SUBSTR (time_end, 1, 2) - SUBSTR (time_start, 1, 2)) * 60
+ (SUBSTR (time_end, 4, 2) - SUBSTR (time_start, 4, 2)))
/ 60),
2)
Hours
FROM per_absence_attendances paa
,per_absence_attendance_types paat
WHERE 1=1
AND paa.absence_attendance_type_id = paat.absence_attendance_type_id
AND paat.name = 'Short Leave'
AND paa.date_start BETWEEN :p_period_start_date AND :p_period_end_date
AND paa.date_end BETWEEN :p_period_start_date AND :p_period_end_date
AND paa.person_id = 1234567890
No comments:
Post a Comment