Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-03-14 : 08:30:29
|
Ravi writes "Hi All,I am new to this group. Now, lets get into the point.I am having a table which stores the employee details along with their superior code. (Same like emp table in Demo database of Oracle).I will write subquery to fetch the subordinates for the selected employee. Thats fineNow my point is for the above said query it will fetch only his/her subordinates, whereas what i need is even the subordinate's subordinates to be displayed. Let me make it easy with an example.empno empname mgrcode1 a 02 b 13 c 24 d 25 e 36 f 4For the normal subquery for the above table would return only 2nd record for the manager A.whereas i need all the record as they all are subordinate for A. This is to display the organization hierarchy." |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-03-14 : 08:32:21
|
Hi. We're established SQL Teamer's. Now let's get to the point.When you post a question on Ask SQL Team, it says very clearly in the first item that we're a Microsoft SQL Server site, and that we don't answer Oracle questions. |
|
|
|
|
|