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 |
|
fd_job
Starting Member
3 Posts |
Posted - 2008-04-02 : 09:14:35
|
| Hi,trying to build Orgchart with MS Accesscolumns: Name (text), Boss (data source, Name), Phone (int)the question - how to avoid the "loop"? 1. prohibit choice for the current employee to choose himself as a leader 2. prohibit choice for the current employee to choose any subordinate level employee as a leader VBA is not an option, we are planning to move this table to MS SQL server, so it should be a choice with "SELECT from Name...." with exceptions or any other checks with warning/error message...?thank youAnthony |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
fd_job
Starting Member
3 Posts |
Posted - 2008-04-02 : 09:49:45
|
[quote]Originally posted by X002548 what's a hinge?Pardon, I meant the loop.... on-line translator service gave me the "hinge" version )) |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Lumbago
Norsk Yak Master
3271 Posts |
Posted - 2008-04-02 : 10:07:02
|
| A simple solution to both 1 and 2 would be to add a column called "Level" that has a number acording to what level in the hierarchy a person is. Then, when somebody chooses a leader always make sure that that persons leader always has a level that is less than the person.--Lumbago"SELECT Rum, Coke, Lime, Ice FROM bar WHERE ClosingTime = 'Late' AND FemaleMaleRatio > 4" |
 |
|
|
fd_job
Starting Member
3 Posts |
Posted - 2008-04-03 : 01:49:39
|
quote: Originally posted by Lumbago A simple solution to both 1 and 2 would be to add a column called "Level" that has a number acording to what level in the hierarchy a person is. Then, when somebody chooses a leader always make sure that that persons leader always has a level that is less than the person.--Lumbago"SELECT Rum, Coke, Lime, Ice FROM bar WHERE ClosingTime = 'Late' AND FemaleMaleRatio > 4"
hmm....interesting idea.... one question: we have 3 departments: director, IT dep (IT_boss, IT_empl_1, IT_empl_2), management group (M_boss, M_empl_1, M_empl_2), finance department (F_boss, F_empl_1, F_empl_2)after org changes finance department moved to management group -> manager for finance dep "M_empl_2"in other words: director, IT dep (IT_boss, IT_empl_1, IT_empl_2), management group (M_boss, M_empl_1, M_empl_2 -> finance department (boss, empl_1, empl_2)which level for "empl_2" should be before/after changes? |
 |
|
|
|
|
|
|
|