CP_SRCH_DR_VW

(SQL View)
Index Back

SES: CP Direct reports View

SES: CP Direct Reports view which unions Direct/ Indireat reports with Self

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_HR_CAREER_PLAN' 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_HR_CAREER_PLAN' 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_HR_CAREER_PLAN' 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_HR_CAREER_PLAN' 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_HR_CAREER_PLAN' 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_HR_CAREER_PLAN' 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_HR_CAREER_PLAN' AND A7.SUPERVISOR_ID<>A7.EMPLID UNION SELECT EMPLID ,EMPLID ,0 ,'SLF' ,0 ,' ' ,LASTUPDDTTM FROM PS_HR_SRCH_CP_VW

# 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.