Query to get the Highest level(One below CEO) of Manager for an employee
Summary
Query to get the Highest level(One below CEO) of Manager for an employeeContent
Hi Team
We have our requirement where we need to fetch the highest level of Manager (who is the direct report of CEO) for an Employee. Please find below the detailed scenario
1. Employee 1 > Manager A > Manager B > Manager C > Manager D > CEO
2. Employee 2 > Manager F > Manager G > Manager H > CEO
We would need to fetch the Manager D and Manager H, when we pass the person number of Employee 1 and Employee 2 respectively as parameter.
Kindly share the sample query where we can fetch the highest level of Manager who is just reporting to CEO for any employee.