I’m having so much trouble with this and any help would be great.
I have a simple table in Oracle 10 that looks like this
Name | EmployeeID | ManagerID | Title
I need a query to return all reports for a given employee ID
So if I pass it employee ID of 1000 it will loop through the direct reports and then indirect reports etc.
I’ve messed with the recursion samples, but none seem to work for me. I know I’m just not setting it up right. Thanks for any help.
FYI. I’m looking for a SQL query on this.
First, let’s setup the test data…
The following query returns Steve and all of his subordinates recursively:
“Flipping” the
PRIORgives us Steve’s superiors instead: