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 |
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2009-12-21 : 12:37:59
|
| Dear All,I have one table(TL_Master) with two columnTL_Id-Emp_IdNow i have to update one table in below formatTL_Id-Emp_IdCriteria:1)If A is roprting to B then there shhould be one row B-A.2)If C is reporting to B then there should be two rows A-C and B-CIt's like hierarchy wise report.Please help me with script |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-12-21 : 18:08:54
|
I think nobody can understand that.Can you provide sample data and wanted result? No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
sanjay5219
Posting Yak Master
240 Posts |
Posted - 2009-12-22 : 15:09:35
|
| Ok i will made this simple.As per my requiement i have to create report where if any agent is login then he will be able to see only his own data if his boss is logging in then he should see his own data and as well as his team data.So that means person who is in highest position he should be able to see all the recordAnd i hae only two column in my table Emploee_Master.First Column is Employee_Code and another is Team_Lead_Id.Hope now ur gettin |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2009-12-23 : 09:21:16
|
| Follow the link in my signature on HOW TO ASK.http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|
|
|