Tuesday, 21 July 2015

How to Get Privelege Leave Initial Balance Using Seeded Oracle Package

How to Get Privelege Leave Initial Balance Using Seeded Oracle Package


SELECT papf.person_id,
         paaf.assignment_id,
         papf.employee_number,
         papf.FULL_NAME,
         'Privelege Leave Initial Balance' element_name,
         per_accrual_calc_functions.Get_Other_Net_Contribution (
            paaf.assignment_id,
            1063,  --ACCRUAL_PLAN_ID from PAY_ACCRUAL_PLANS table
            '01-APR-2014',  --Calculation_Date
            '01-JAN-2014') --Start_Date
            Privelege_Leave_Initial_Bal
    FROM per_all_people_f papf, per_all_assignments_f paaf
   WHERE 1 = 1 AND papf.person_id = paaf.person_id
         AND TRUNC (SYSDATE) BETWEEN TRUNC (papf.EFFECTIVE_START_DATE)
                                 AND TRUNC (papf.EFFECTIVE_END_DATE)
         AND TRUNC (SYSDATE) BETWEEN TRUNC (paaf.EFFECTIVE_START_DATE)
                                 AND TRUNC (paaf.EFFECTIVE_END_DATE)
         AND EMPLOYEE_NUMBER IS NOT NULL
--and papf.employee_number='500015'
ORDER BY 1;

No comments:

Post a Comment