TL_ESS_JOBCP_VW

(SQL View)
Index Back

Select Job & Comp Plan View

This view is used for selecting current T&L jobs and Comp Plans.

SELECT A.EMPLID ,A.EMPL_RCD ,A.EFFDT ,A.BUSINESS_UNIT ,A.SETID_DEPT ,A.SETID_JOBCODE ,A.DEPTID ,D.DESCR ,A.JOBCODE ,JC.DESCR ,B.EFFDT ,B.TIME_RPTR_IND ,COMP.COMP_TIME_PLAN FROM PS_JOB A , PS_TL_EMPL_DATA B ,PS_TL_EMPL_COMP COMP , PS_JOBCODE_TBL JC ,PS_DEPT_TBL D WHERE B.TIME_RPTG_STATUS = 'A' AND A.EMPLID = B.EMPLID AND A.EMPL_RCD = B.EMPL_RCD AND A.EMPLID=COMP.EMPLID AND A.EMPL_RCD=COMP.EMPL_RCD AND COMP.EFFDT = ( SELECT MAX(EFFDT) FROM PS_TL_EMPL_COMP WHERE EMPLID = COMP.EMPLID AND EMPL_RCD = COMP.EMPL_RCD AND COMP_TIME_PLAN = COMP.COMP_TIME_PLAN AND EFFDT <= %CurrentDateIn) AND B.EFFDT = ( SELECT MAX(EFFDT) FROM PS_TL_EMPL_DATA WHERE EMPLID = B.EMPLID AND EMPL_RCD = B.EMPL_RCD AND EFFDT <= %CurrentDateIn) AND A.EFFDT = ( SELECT MAX (EFFDT) FROM PS_JOB WHERE EMPLID = A.EMPLID AND EMPL_RCD = A.EMPL_RCD AND EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(EFFSEQ) FROM PS_JOB WHERE EMPLID = A.EMPLID AND EMPL_RCD = A.EMPL_RCD AND EFFDT = A.EFFDT) AND JC.SETID = A.SETID_JOBCODE AND JC.JOBCODE = A.JOBCODE AND JC.EFFDT = ( SELECT MAX(JC1.EFFDT) FROM PS_JOBCODE_TBL JC1 WHERE JC1.SETID = A.SETID_JOBCODE AND JC1.JOBCODE = A.JOBCODE AND JC1.EFFDT <= A.EFFDT) AND D.SETID = A.SETID_DEPT AND D.DEPTID = A.DEPTID AND D.EFFDT = ( SELECT MAX(D1.EFFDT) FROM PS_DEPT_TBL D1 WHERE D1.SETID = A.SETID_DEPT AND D1.DEPTID = A.DEPTID AND D1.EFFDT <= A.EFFDT)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID

Default Value: NEW

Prompt Table: PERSON

2 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Rcd Nbr
3 ACTION_DT Date(10) DATE Action Date
4 BUSINESS_UNIT Character(5) VARCHAR2(5) NOT NULL Business Unit

Default Value: OPR_DEF_TBL_HR.BUSINESS_UNIT

Prompt Table: BUS_UNIT_TBL_HR

5 SETID_DEPT Character(5) VARCHAR2(5) NOT NULL Department SetID
6 SETID_JOBCODE Character(5) VARCHAR2(5) NOT NULL Job Code SetID
7 DEPTID Character(10) VARCHAR2(10) NOT NULL Department

Prompt Table: DEPT_TBL

8 DEPT_DESCR Character(30) VARCHAR2(30) NOT NULL Department Description
9 JOBCODE Character(6) VARCHAR2(6) NOT NULL Job Code

Prompt Table: JOBCODE_TBL

10 JOB_DESCR Character(30) VARCHAR2(30) NOT NULL Job Description
11 DATE_WRK Date(10) DATE Date Work Field
12 TIME_RPTR_IND Character(1) VARCHAR2(1) NOT NULL Indicates whether a Time Reporter is primarily reports Elapsed Time or Punch Time.
E=Elapsed Time Reporter
P=Punch Time Reporter
13 COMP_TIME_PLAN Character(10) VARCHAR2(10) NOT NULL Compensatory Time Off Plan