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 |
|
Arun.G
Yak Posting Veteran
81 Posts |
Posted - 2010-07-13 : 02:56:36
|
| my input argument is emp_idthen i should display1) employee name2) org_id and name of the input emp_id3) list of employees under the organzation of the given emp_id's org4) list of employees and collegues in the same org5) list of employees whoall r reporting to same manger as given emp_id's reporting mangerv can do all this seperately through stored procedures,but how can v do this with only one function should satisfy all the above 5 things?pls suggest some sample coding and ideas? |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-07-13 : 03:15:37
|
| You can do this by using a table valued function which will return all your desired data.Have a look herehttp://msdn.microsoft.com/en-us/library/ms191165.aspxLimitations live only in our minds. But if we use our imaginations, our possibilities become limitless. PBUH |
 |
|
|
|
|
|