Thursday, July 26, 2018

Query to Get the Employee Salary Increase Summary


  SELECT ppf.employee_number,
         ppf.full_name,
         ppp.proposed_salary_n,
         ppp.change_date
    FROM per_pay_proposals ppp,
         per_all_people_f ppf,
         per_all_assignments_f paaf
   WHERE     ppf.person_id = paaf.person_id
         AND paaf.assignment_id = ppp.assignment_id
         AND TRUNC (SYSDATE) BETWEEN ppf.effective_start_date
                                 AND ppf.effective_end_date
         AND TRUNC (SYSDATE) BETWEEN paaf.effective_start_date
                                 AND paaf.effective_end_date
         AND ppp.approved = 'Y'
         AND change_date =
                (SELECT MIN (change_date)
                   FROM per_pay_proposals
                  WHERE     assignment_id = ppp.assignment_id
                        AND proposed_salary_n = ppp.proposed_salary_n)   
         AND ppf.employee_number = '1234567890'
ORDER BY ppp.change_date DESC

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)