Wednesday 21 August 2019

HCM SQL: Mapping Between Absence Plan and Type

SELECT 
        aapf.absence_plan_id,
        aapft.name absence_plan_name,
        aatft.name absence_type_name,
        aatft.absence_type_id,
        aatp.ABSENCE_TYPE_PLAN_ID,
        aatf.status
    FROM
        anc_absence_plans_f_tl aapft,
        anc_absence_plans_f aapf,
        ANC_ABSENCE_TYPES_F_TL aatft,
        ANC_ABSENCE_TYPES_F aatf,
        ANC_ABSENCE_TYPE_PLANS_F aatp
    WHERE 1=1
        --------
        and aapft.absence_plan_id = aapf.absence_plan_id
        AND aapf.plan_status = 'A'   -- added to pick only Active Absence Plans
        AND aapft.language = 'US'
        and aapf.LEGISLATIVE_DATA_GROUP_ID = :P_LDG
        --------
        and aatft.absence_type_id = aatf.absence_type_id
        AND aatf.status = 'A'   -- added to pick only Active Absence Plans
        AND aatft.language = 'US'       
        and aatf.LEGISLATIVE_DATA_GROUP_ID = :P_LDG
        --------
        and aatp.ABSENCE_PLAN_ID = aapf.absence_plan_id
        and aatp.ABSENCE_TYPE_ID = aatf.ABSENCE_TYPE_ID
        --------   
        AND trunc(SYSDATE) BETWEEN aapf.effective_start_date AND aapf.effective_end_date
        AND trunc(SYSDATE) BETWEEN aapft.effective_start_date AND aapft.effective_end_date
        AND trunc(SYSDATE) BETWEEN aatp.effective_start_date AND aatp.effective_end_date
        AND trunc(SYSDATE) BETWEEN aatft.effective_start_date AND aatft.effective_end_date
        AND trunc(SYSDATE) BETWEEN aatf.effective_start_date AND aatf.effective_end_date

3 comments:

  1. Oracle Apps R12 and Fusion Cloud Self Paced Training Videos by Industry Experts with Live Meeting Support. Please Check https://www.oracleappstechnical.com

    ReplyDelete

  2. Thanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle Fusion HCM . Actually, I was looking for the same information on internet for
    Oracle Fusion HCM Interview Questions and Answers and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject.

    ReplyDelete

  3. I am very happy for seeing your webpage. I was searching this one for a long time. Here is another webpage same as yours, I got it while am searching for the same information on internetOracle Fusion HCM Iam stuck on another one also
    Oracle Fusion HCM Interview Questions and Answers .Thank you for your great information.

    ReplyDelete