Wednesday, October 27, 2021

Query to get list of Active Employees along with their Supervisor’s details in Oracle APPS

SELECT employee.employee_number,
       employee.full_name,
       employee.email_address,
       paaf.supervisor_id,
       supervisor.full_name,
       supervisor.email_address
  FROM per_all_people_f employee
      ,per_all_assignments_f paaf
      ,per_people_x supervisor
 WHERE employee.current_employee_flag = 'Y'
   AND paaf.supervisor_id(+) = supervisor.person_id
   AND TRUNC (SYSDATE) BETWEEN employee.effective_start_date
                           AND employee.effective_end_date
   AND TRUNC (SYSDATE) BETWEEN supervisor.effective_start_date
                           AND supervisor.effective_end_date
   AND employee.person_id = paaf.person_id
   AND employee.employee_number IS NOT NULL
   --AND employee.employee_number = '1234567890'
   AND employee.person_type_id =
          (SELECT person_type_id
             FROM per_person_types
            WHERE user_person_type = 'Employee'
              AND business_group_id = employee.business_group_id
            )

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)