You are here: Select option to execute the maxi number of direct subordinate « MsSQL Server « IT news, forums, messages
Select option to execute the maxi number of direct subordinate

Posted by J.Balakumar on 09/27/82 11:34

hai,
help me out of a select option that should makes to display only the
maximum number of subordinate to their immediate senior in an
organization.
like...
MD > 3 director > each has 2,3,4 person reporting subordinate
respectively.
i want to display one director have maximum 4 subordinates.
that 4 subordinates to be displayed.

empid name reporting to designation
1 aaa null MD
2 bbb aaa pm
3 ccc aaa pm
4 ddd aaa pm
5 eee bbb pl
6 f f f bbb pl
7 ggg ccc pl
8 hhh ccc pl
9 i i i ccc pl
10 j j j ddd SE
11 kkk ddd SE
12 l l l ddd SE
13 mmm ddd SE


I want to display the information of employee,whom they are DIRECTLY
Reporting to,who is having maximum number of direct subordianate.i want
to display of SE(designation) to be get display.
help me out of a select statement to view while execution.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация