GPBR_EMP_CIA_VW

(SQL View)
Index Back

Search Employees View

Search Employees View

SELECT DISTINCT JOB.COMPANY , JOB.EFFDT , JOB.EMPLID , JOB.EMPL_RCD , NAM.NAME FROM PS_JOB JOB , PS_NAMES NAM WHERE JOB.EMPLID = NAM.EMPLID AND NAME_TYPE = 'PRI' AND NAM.EFFDT = ( SELECT MAX(NAM2.EFFDT) FROM PS_NAMES NAM2 WHERE NAM2.EMPLID = NAM.EMPLID AND NAM2.NAME_TYPE = NAM.NAME_TYPE AND EFFDT <= %CurrentDateIn) AND JOB.EFFDT = ( SELECT MAX(JOB3.EFFDT) FROM PS_JOB JOB3 WHERE JOB3.EMPLID = JOB.EMPLID AND JOB3.EMPL_RCD= JOB.EMPL_RCD AND JOB3.COMPANY = JOB.COMPANY) AND JOB.EFFSEQ = ( SELECT MAX(JOB2.EFFSEQ) FROM PS_JOB JOB2 WHERE JOB.EMPLID=JOB2.EMPLID AND JOB.EMPL_RCD=JOB2.EMPL_RCD AND JOB.COMPANY = JOB2.COMPANY AND JOB2.EFFDT<=JOB.EFFDT)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 COMPANY Character(3) VARCHAR2(3) NOT NULL Company
2 EFFDT Date(10) DATE Effective Date

Default Value: %date

3 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
4 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Record
5 NAME Character(50) VARCHAR2(50) NOT NULL Name