Hi,
I have a employee table, with two additional columns that stores the node number (left and right) for a tree for hierarchy . There is a procedure that computes the node number and stores when a new employee is added. The idea is to list all the employees who work under a manager , all the way to the bottom. So the structure is something like this
| ID | Name | lft | rgt |
| 1 | John | 315300 | 595600 |
| 2 | Adam | 519000 | 522700 |
| 3 | Lisa | 520500 | 521400 |
| 4 | Sally | 389400 | 389500 |
| 5 | Robert | 670200 | 1098300 |
| 6 | Jerry | 910100 | 950000 |
| 7 | Fred | 937600 | 939300 |
| 8 | Alex | 289200 | 1432300 |
Here is the tree

I need a query to traverse the tree from any point ( any manager at any level ). So I should be able to see all the employees working for John, or all the employees working for Robert or both together .
Thanks