Getting Hierarchical values without using hierarchical query
Hi all,
I want to find out hierarchical values without using hierarchical query. I am having two tables EMP, DEPT
EMP table is having two columns (empid, mgrid)
DEPT table is having two columns (deptid, empid)
EMP data
1,
2, 1
3, 2
4, 3
DEPT data
10, 1
Whenever, I gave deptid = 10, I have to find out the empid of that deptid and then who is reporting to that empid (child levels also). In this case, the output should be
1
2
3
4
I don't want to use Hierarchical query.
Thanks in advance.
Thanks,
Pal