In looking at your result set, it appears that
there is no way of determining which employee is responsible to which manager.
This is how I've done it:
Every employee is assigned a
StationID. For example a Sr. Manager or Administrator is assigned an ID of
'B01' (Business unit 01).
Then every manager under that
Sr. Manager is assigned a StationID that ties them to the Sr. Manager. For
Example 'B01A', or 'B01B' ... 'B01ZZ'.
Then every employee under that
Manager is assigned a StationID that ties them to their specific Manager.
For example 'B01A1' or 'B01A2'. Or for a different Manager 'B01ZZ1' or
'B01ZZ2'.
Now you can do a query to select all employees
under a Sr. Manager, Manager, or etc. by performing this type of simple
Query:
"SELECT employee_name WHERE
stationid LIKE 'B01%';" This will return all the employees whose StationID
matches that of the Sr. Manager. If you only want the employees under a Manager,
just change the LIKE clause in the query to: LIKE 'B01ZZ%'
Hope this helps.
Derrick Betts
|
- [pgadmin-support] How to find out hierchy of employee? VivekanandaSwamy R.
- Re: [pgadmin-support] How to find out hierchy of ... Derrick Betts
- Re: [pgadmin-support] How to find out hierchy of ... Derrick Betts