SELECT papf.full_name,
fu.user_name,
hapf.NAME Position,
haou.NAME Organzation,
asg.primary_flag AS "Primary Position",
papf.person_id
FROM fnd_user fu,
per_all_people_f papf,
per_all_assignments_f asg,
hr_all_positions_f hapf,
hr_all_organization_units haou
WHERE papf.person_id = asg.person_id(+)
AND SYSDATE BETWEEN papf.effective_start_date
AND papf.effective_end_date
AND SYSDATE BETWEEN asg.effective_start_date AND asg.effective_end_date
AND asg.position_id = hapf.position_id(+)
AND fu.employee_id(+) = papf.person_id
AND haou.organization_id = asg.organization_id
AND (
upper(pos.NAME) LIKE upper('%&Name%') OR
upper(us.user_name) LIKE upper('%&Name%') OR
upper(ppl.full_name) LIKE upper('%&Name%')
)
ORDER BY hapf.NAME
0 comments:
Post a Comment