TRW_SRCH_DR_VW

(SQL View)
Index Back

Direct Reports Type 2 Temp

Temporary table for incremental build of Direct Reports for Access Type 2 by Supervisor Id This table contains is the direct reports reporting structure based on the "Supervisor Id" field on the Job record to determine reporting relationships. Note that this method does not differentiate between multiple concurrent jobs that the supervisor might hold.

SELECT A1.SUPERVISOR_ID ,A1.EMPLID ,A1.EMPL_RCD ,A1.HR_SRCH_ASSOC_CD ,A1.HR_DR_LEVEL ,A1.ROWSECCLASS ,A1.LASTUPDDTTM FROM PS_HR_SRCH_DR_1 A1 , PS_HR_SRCH_CONTROL C1 WHERE C1.ACCESS_TYPE='1' AND C1.PTSF_SBONAME='HC_COMP_TOTALREWARDS' UNION SELECT A2.SUPERVISOR_ID ,A2.EMPLID ,A2.EMPL_RCD ,A2.HR_SRCH_ASSOC_CD ,A2.HR_DR_LEVEL ,' ' ,A2.LASTUPDDTTM FROM PS_HR_SRCH_DR_2 A2 , PS_HR_SRCH_CONTROL C2 WHERE C2.ACCESS_TYPE='2' AND C2.PTSF_SBONAME='HC_COMP_TOTALREWARDS' AND A2.SUPERVISOR_ID<>A2.EMPLID UNION SELECT A3.SUPERVISOR_ID ,A3.EMPLID ,A3.EMPL_RCD ,A3.HR_SRCH_ASSOC_CD ,A3.HR_DR_LEVEL ,' ' ,A3.LASTUPDDTTM FROM PS_HR_SRCH_DR_3 A3 , PS_HR_SRCH_CONTROL C3 WHERE C3.ACCESS_TYPE='3' AND C3.PTSF_SBONAME='HC_COMP_TOTALREWARDS' AND A3.SUPERVISOR_ID<>A3.EMPLID UNION SELECT A4.SUPERVISOR_ID ,A4.EMPLID ,A4.EMPL_RCD ,A4.HR_SRCH_ASSOC_CD ,A4.HR_DR_LEVEL ,' ' ,A4.LASTUPDDTTM FROM PS_HR_SRCH_DR_4 A4 , PS_HR_SRCH_CONTROL C4 WHERE C4.ACCESS_TYPE='4' AND C4.PTSF_SBONAME='HC_COMP_TOTALREWARDS' AND A4.SUPERVISOR_ID<>A4.EMPLID UNION SELECT A5.SUPERVISOR_ID ,A5.EMPLID ,A5.EMPL_RCD ,A5.HR_SRCH_ASSOC_CD ,A5.HR_DR_LEVEL ,' ' ,A5.LASTUPDDTTM FROM PS_HR_SRCH_DR_5 A5 , PS_HR_SRCH_CONTROL C5 WHERE C5.ACCESS_TYPE='5' AND C5.PTSF_SBONAME='HC_COMP_TOTALREWARDS' AND A5.SUPERVISOR_ID<>A5.EMPLID UNION SELECT A6.SUPERVISOR_ID ,A6.EMPLID ,A6.EMPL_RCD ,A6.HR_SRCH_ASSOC_CD ,A6.HR_DR_LEVEL ,' ' ,A6.LASTUPDDTTM FROM PS_HR_SRCH_DR_6 A6 , PS_HR_SRCH_CONTROL C6 WHERE C6.ACCESS_TYPE='6' AND C6.PTSF_SBONAME='HC_COMP_TOTALREWARDS' AND A6.SUPERVISOR_ID<>A6.EMPLID UNION SELECT A7.SUPERVISOR_ID ,A7.EMPLID ,A7.EMPL_RCD ,A7.HR_SRCH_ASSOC_CD ,A7.HR_DR_LEVEL ,' ' ,A7.LASTUPDDTTM FROM PS_HR_SRCH_DR_7 A7 , PS_HR_SRCH_CONTROL C7 WHERE C7.ACCESS_TYPE='7' AND C7.PTSF_SBONAME='HC_COMP_TOTALREWARDS' AND A7.SUPERVISOR_ID<>A7.EMPLID UNION SELECT EMPLID ,EMPLID ,0 ,'SLF' ,0 ,' ' ,%Sql(HR_SRCH_DT_TO_DTTM,TRW_PUBLISH_DT) FROM PS_TRW_EE_STMT

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 SUPERVISOR_ID Character(11) VARCHAR2(11) NOT NULL Supervisor ID
2 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
3 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Record
4 HR_SRCH_ASSOC_CD Character(3) VARCHAR2(3) NOT NULL SES: Association Code: Used in Associated facets
DEL=Delegations
DIR=Direct Reports
EMP=Employee
IND=Indirect Reports
NON=Not Associated
SLF=Self
5 HR_DR_LEVEL Number(3,0) SMALLINT NOT NULL Number denoting how many levels down the organizational chart the employee is from the supervisor. Direct reports are always level 1.
6 ROWSECCLASS Character(30) VARCHAR2(30) NOT NULL The class used to determine row level security
7 LASTUPDDTTM DateTime(26) TIMESTAMP Specifies the date and time of the last update to an entry. This field is maintained by PeopleSoft and is used in a variety of contexts.