SELECT ppf.employee_number,
ppf.full_name,
ppf.email_address,
paaf.supervisor_id,
sup.full_name,
sup.email_address
FROM per_all_people_f ppf
,per_all_assignments_f paaf
,per_people_x sup
WHERE ppf.current_employee_flag = 'Y'
AND paaf.supervisor_id(+) = sup.person_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 ppf.person_id = paaf.person_id
AND ppf.employee_number IS NOT NULL
AND ppf.person_type_id =
(SELECT person_type_id
FROM per_person_types
WHERE user_person_type = 'Employee'
AND business_group_id = ppf.business_group_id)
AND ppf.employee_number = <<XX_EMP_NUM>>
ppf.full_name,
ppf.email_address,
paaf.supervisor_id,
sup.full_name,
sup.email_address
FROM per_all_people_f ppf
,per_all_assignments_f paaf
,per_people_x sup
WHERE ppf.current_employee_flag = 'Y'
AND paaf.supervisor_id(+) = sup.person_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 ppf.person_id = paaf.person_id
AND ppf.employee_number IS NOT NULL
AND ppf.person_type_id =
(SELECT person_type_id
FROM per_person_types
WHERE user_person_type = 'Employee'
AND business_group_id = ppf.business_group_id)
AND ppf.employee_number = <<XX_EMP_NUM>>
No comments:
Post a Comment