RS_ST_ELGBLWRKR

(SQL View)
Index Back

PTSF Staffing Eligible Worker

This view selects currently eligible Employees where the RS_WRKR_EFFDT table contains a currently effective record and WRKR_INELIGIBLE = 'N'. It also selects all Applicants with a valid status.

SELECT A.EMPLID , A.SUPERVISOR_ID , A.PER_STATUS , CASE WHEN B.DTTM_MODIFIED > %Dttm(A.EFFDT, %TIMEIN('23.59.00.000000')) THEN B.DTTM_MODIFIED ELSE %Dttm(A.EFFDT, %TIMEIN('23.59.00.000000')) END FROM %Table(RS_WRKR_ELGBL) A LEFT OUTER JOIN PS_RS_SRCH_LOG B ON B.DOCUMENT = A.EMPLID WHERE A.SYSTEM_SOURCE='STF' UNION SELECT A.APPLID AS EMPLID , ' ' , A.APP_PER_STATUS , %Coalesce( B.DTTM_MODIFIED, %DATETIMEIN('1900-01-01 00.00.00.000000')) AS LASTUPDDTTM FROM %Table(APPLICANT) A LEFT OUTER JOIN PS_RS_SRCH_LOG B ON B.DOCUMENT = A.APPLID WHERE A.APP_PER_STATUS ='A' AND A.APP_STATUS_CODE ='A'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 SUPERVISOR_ID Character(11) VARCHAR2(11) NOT NULL Supervisor ID
3 PER_STATUS Character(1) VARCHAR2(1) NOT NULL Personnel Status
E=Employee
N=Non-Employee
4 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.