Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting Hierarchical values without using hierarchical query

user546710May 29 2013 — edited May 30 2013
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
This post has been answered by jeneesh on May 29 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 27 2013
Added on May 29 2013
10 comments
235 views