Payroll Calendar Events
SELECT PCEV.name name_gce,
(SELECT meaning
FROM HR_lookups
WHERE lookup_type = 'PER_CAL_EVENT_CATEGORY'
AND lookup_code = PCEV.category ) category_gce,
PCEV.short_code short_code_gce,
PCEV.start_date_time start_date_gce,
PCEV.end_date_time end_date_gce,
PCEV.description description_gce,
(SELECT FLV.meaning
FROM FND_LOOKUP_VALUES_VL FLV
WHERE FLV.lookup_type = 'PER_CAL_COVERAGE_TYPE'
AND FLV.lookup_code = PCEV.coverage_type) hierarchy_type_gce,
(SELECT tree_name
FROM FND_TREE_VL
WHERE tree_code = PCEV.tree_code )hierarchy_gce,
PCEV.tree_code cov_source_gce,
HR_GENERAL.DECODE_LOOKUP('YES_NO',PCEV.HALF_DAY_FOR_ELAPSED) half_day_elapsed_gce
FROM PER_CALENDAR_EVENTS_VL PCEV
WHERE (
(:P_CREATION_TYPE= 'Custom' and PCEV.created_by <> 'SEED_DATA_FROM_APPLICATION' )
OR (:P_CREATION_TYPE = 'Seeded' and PCEV.created_by = 'SEED_DATA_FROM_APPLICATION' )
OR (:P_CREATION_TYPE = 'Seeded Modified' and PCEV.created_by = 'SEED_DATA_FROM_APPLICATION' and PCEV. last_updated_by <> 'SEED_DATA_FROM_APPLICATION')
OR (:P_CREATION_TYPE = 'ALL')
)