Wednesday, December 8, 2021

Query to extract Employee Information for Data Migration

SELECT papf.employee_number,
       papf.last_name,
       papf.first_name,
       papf.middle_names,
       papf.title,
       papf.full_name,
       TO_CHAR(papf.start_date, 'DD-MON-RRRR') hire_date,
       TO_CHAR(papf.original_date_of_hire, 'DD-MON-RRRR') original_date_of_hire,
       TO_CHAR(papf.date_of_birth, 'DD-MON-RRRR')  date_of_birth,
       papf.town_of_birth,
       papf.region_of_birth,
       papf.country_of_birth,
       papf.sex,
       papf.nationality,
       ppt.user_person_type person_type,
       papf.national_identifier,
       papf.blood_type blood_group,
       papf.email_address,
       papf.marital_status,
       papf.office_number,
       papf.attribute_category,
       papf.attribute1,
       papf.attribute2,
       papf.attribute3,
       papf.attribute4,
       papf.attribute5,
       papf.attribute6,
       papf.attribute7,
       papf.attribute8,
       papf.attribute9,
       papf.attribute10,
   papf.attribute11,
   papf.attribute12,
   papf.attribute13,
   papf.attribute14,
   papf.attribute15
  FROM per_all_people_f papf,
       per_periods_of_service pos,
       per_person_type_usages_f pptu,
       per_person_types ppt
 WHERE     1 = 1
       AND papf.person_id = pos.person_id
       AND papf.person_id = pptu.person_id
       AND pptu.person_type_id = ppt.person_type_id
       AND papf.current_employee_flag = 'Y'
       AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date
                               AND papf.effective_end_date
       AND TRUNC (SYSDATE) BETWEEN pptu.effective_start_date
                               AND pptu.effective_end_date
order by (papf.employee_number)

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)