Query to extract Employee Contact Information
SELECT papf.person_id employee_id, papf.full_name employee_name,papf.effective_start_date employee_start_date,papf.effective_end_date employee_end_date,papf_cont.full_name contact_name, hl.meaning contact_type,pcr.date_start contact_start_date, pcr.date_end contact_end_dateFROM per_contact_relationships pcr,per_all_people_f papf,hr_lookups hl,per_all_people_f papf_contWHERE 1 = 1AND papf.person_id = pcr.person_idAND pcr.contact_person_id = papf_cont.person_idAND NVL (TRUNC (papf.effective_end_date), SYSDATE) >= TRUNC (SYSDATE)AND NVL (TRUNC (papf_cont.effective_end_date), SYSDATE) >= TRUNC (SYSDATE)AND hl.lookup_type(+) = ‘CONTACT’AND hl.lookup_code(+) = pcr.contact_type
Recent Comments