How to write a Dynamic Supervisor Query in AME for Requisition
Hello,
I wrote up a Dynamic Supervisor Hiearchy for the Internal requsition
SELECT (
select distinct full_name from per_all_people_f
where person_id = paf.person_id
and sysdate between effective_start_date and effective_end_date ) TREE
FROM per_all_assignments_f paf
START WITH paf.person_id = :PERSON_ID
AND paf.primary_flag = 'Y'
AND SYSDATE BETWEEN paf.effective_start_date AND
paf.effective_end_date
CONNECT BY paf.person_id = PRIOR paf.supervisor_id
AND paf.primary_flag = 'Y'
AND SYSDATE BETWEEN paf.effective_start_date AND
paf.effective_end_date
Its showing the whole supervisor hiearchy of the the requestor.If I want to restrict the supervisor hiearchy upto Director Level please guide me how to modify the query above.