Wednesday, April 9, 2025

SQL Query to Generate HDL for Seniority Dates from Oracle Fusion

 SELECT 'METADATA|SeniorityDate|SeniorityDateCode|PersonNumber|EntryDate|EffectiveStartDate|ManualAdjustmentDays|ManualAdjustmentComments' SD_HDL
FROM DUAL
UNION
SELECT 'MERGE|SeniorityDate|SENIORITY_ENT'
||
papf.person_number
||'|'||
sd.entry_date
||'|'||
sd.effective_start_date
||'|'||
0
||'|'||
'HDL Adjustment for Seniority Date'
FROM per_seniority_dates_f sd,
     per_all_people_f papf
where sd.person_id= papf.person_id
and seniority_date_code='IR_ENT'
and papf.person_number='683558'
and trunc(sysdate) between papf.effective_start_date and papf.effective_end_Date

/*
METADATA|SeniorityDate|SeniorityDateCode|PersonNumber|EntryDate|EffectiveStartDate|ManualAdjustmentDays|ManualAdjustmentComments
MERGE|SeniorityDate|SENIORITY_ENT|683558|1984/10/18|1984/10/18|0|HDL Adjustment for Seniority Date
*/

No comments:

Post a Comment