pro_vb thread: Re: A Query on bosses list.
Hello All,
I have a query if anybody can silve this i will be
very thankful.
I have a table in which Empcode is the PK and bossid
is the FK key to the same table related to
empcode.That is Bossid is the empcode if the employee
who is the boss of the coresponding employee.The
person who is at top most position means who don't
have any boss,has the bossid 0.
Empcode name bossid
---------------------------------
1 AA 0
2 b1 1
3 b2 1
4 b3 1
5 c1 2
6 c2 2
7 d1 3
8 e1 4
9 f1 5
10 f2 5
11 g1 6
--------------------------------------
Now i want to get the list of all the bosses above an
employee.Example,
If I give Empcode 9 then I should get the list
f1->c1->b1->AA
Thanks in advance.
Sonia.
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com