RS_CW_EMPLID_VW

(SQL View)
Index Back

Create Resources


SELECT A.EMPLID , A.NAME , A.PER_STATUS , B.JOBCODE , B.BUSINESS_UNIT , B.LOCATION , B.DEPTID , 'N' FROM %Table(PERSONAL_DATA) A , %Table(JOB) B , %Table(INSTALLATION_RS) AC WHERE A.EMPLID = B.EMPLID AND (AC.NON_EMPL_STAFF = 'Y' OR (AC.NON_EMPL_STAFF = 'N' AND A.PER_STATUS = 'E')) AND B.EFFDT = ( SELECT MAX(BC.EFFDT) FROM %Table(JOB) BC WHERE BC.EMPLID = B.EMPLID AND BC.EMPL_RCD = B.EMPL_RCD AND BC.EFFDT <= %CurrentDateIn) AND B.EFFSEQ = ( SELECT MAX(D.EFFSEQ) FROM %Table(JOB) D WHERE D.EMPLID = B.EMPLID AND D.EMPL_RCD = B.EMPL_RCD AND D.EFFDT = B.EFFDT) AND B.EMPL_STATUS = 'A' AND A.EMPLID NOT IN ( SELECT E.EMPLID FROM %Table(RS_WORKER_TBL) E ) AND B.BUSINESS_UNIT IN ( SELECT DISTINCT S.BUSINESS_UNIT FROM %Table(BUS_UNIT_TBL_HR) S WHERE S.ACTIVE_INACTIVE = 'A')

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 PERSON_NAME Character(100) VARCHAR2(100) NOT NULL Name
3 PER_STATUS Character(1) VARCHAR2(1) NOT NULL Personnel Status
E=Employee
N=Non-Employee
4 JOBCODE Character(6) VARCHAR2(6) NOT NULL Job Code
5 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit
6 LOCATION Character(10) VARCHAR2(10) NOT NULL Location Code
7 DEPTID Character(10) VARCHAR2(10) NOT NULL Department
8 RS_CW_SELECTED Character(1) VARCHAR2(1) NOT NULL VARCHAR2(1) NOT NULL

Y/N Table Edit