Tom,

I did something like this before where I created a permanent table that
gets updated at the time anyone changes managers. This new table only
contains two columns: person-id, and manager-id. The table contains
multiple records for the same person, one for each manager the person
reports to directly or indirectly. You also need to have a one time program
that will populate this table.

Having a table like this will help you find managers at any level and all
their reports.

If you need, I can look for that program that populates the table the first
time. The code will not be in ColdFusion though.

Rosa




                                                                                       
    
                    "Schreck, Tom"                                                     
    
                    <Tom.Schreck@p        To:     <[EMAIL PROTECTED]>                   
    
                    pcnet.com>            cc:                                          
    
                    Sent by:              Subject:     SQL Question                    
    
                    list-request@D                                                     
    
                    FWCFUG.ORG                                                         
    
                                                                                       
    
                                                                                       
    
                    09/18/2002                                                         
    
                    08:47 AM                                                           
    
                    Please respond                                                     
    
                    to list                                                            
    
                                                                                       
    
                                                                                       
    




I have a database of personnel which contains manager-employee relationship
data.  The personnel record contains the id of that person's manager
(numManagerID).  numManagerID points to another record within the personnel
table.  I need to have a recordset containing all personnel who's in a
manager's organization, not just direct reports.  Has anyone done something
similar to this?  I'm envisioning a lot of looping to build a recordset of
all personnel within a given manager's organization.  Any help/advice would
be appreciated.





Thanks -





Tom Schreck


817-252-4900


[EMAIL PROTECTED]





I have not failed.  I've found 10,000 ways that won't work.





- Thomas Edison











-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to