Need help creating a ReportsTo Employee Report

S

Scott Campbell

I have a table 'tbl_employees" with the following field:

EmployeeID (Primary)
Employee Name
Email
ReportsToEmail
..... and other fields that aren't relevant

I need to be able to run a query that show ALL employees that report up to a
specific person. It is fairly easy to do a report that show who reports
directly to a specific person, but I need to find all employees that are in
that organization.

For example, if a company had the following hierarchy,
CEO
-VP1
--GM1
---controller
----asst controller
-----staff accountant
-----staff accountant
-vp2
--gm2
---director of marketing
etc

I want to find out who reports to the GM1 (Controller, Asst Controll, Staff
Acct1, Staff Acct2)

Any suggestions?

Thanks in advance
 
S

Scott Campbell

I found Allen Browne's writeup on Self-Joins
http://allenbrowne.com/ser-06.html which is close to what I want. That
example allowed you to see all the horses ahead of him in the creation
process.

What I need to know is how many horses a particular horse is responsible for
creating , either directly (sons and daughters) or indirectly (grandkids,
great grandkids, great-great grandkids gre..........etc).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top