CUR_JOB_PYGRP

(SQL View)
Index Back

Current Job/Paygroup from Job

CUR_JOB_PYGRP is a view that combines an employee's current job assignment for company and paygroup from the job record with country from the paygroup record. This view is used primarily for editing.

SELECT A.EMPLID , A.EMPL_RCD , A.EFFDT , A.EFFSEQ , A.EMPL_STATUS , A.COMPANY , A.PAYGROUP , B.COUNTRY FROM PS_JOB A , PS_PAYGROUP_TBL B WHERE A.EMPL_STATUS IN ('A','L','P','W') AND A.PAY_SYSTEM_FLG = 'NA' AND A.COMPANY = B.COMPANY AND A.PAYGROUP = B.PAYGROUP AND B.EFF_STATUS = 'A' AND A.EFFDT = ( SELECT MAX(C.EFFDT) FROM PS_JOB C WHERE C.EMPLID = A.EMPLID AND C.EMPL_RCD = A.EMPL_RCD AND C.EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(D.EFFSEQ) FROM PS_JOB D WHERE D.EMPLID = A.EMPLID AND D.EMPL_RCD = A.EMPL_RCD AND D.EFFDT = A.EFFDT) AND B.EFFDT = ( SELECT MAX(E.EFFDT) FROM PS_PAYGROUP_TBL E WHERE E.COMPANY = A.COMPANY AND E.PAYGROUP = A.PAYGROUP AND E.EFFDT <= A.EFFDT)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Rcd Nbr
3 EFFDT Date(10) DATE NOT NULL Effective Date

Default Value: %date

4 EFFSEQ Number(3,0) SMALLINT NOT NULL Effective Sequence
5 EMPL_STATUS Character(1) VARCHAR2(1) NOT NULL Payroll Status
A=Active
D=Deceased
L=Leave of Absence
P=Leave With Pay
Q=Retired With Pay
R=Retired
S=Suspended
T=Terminated
U=Terminated With Pay
V=Terminated Pension Pay Out
W=Short Work Break
X=Retired-Pension Administration
6 COMPANY Character(3) VARCHAR2(3) NOT NULL Company

Default Value: OPR_DEF_TBL_HR.COMPANY

Prompt Table: COMPANY_TBL

7 PAYGROUP Character(3) VARCHAR2(3) NOT NULL Pay Group
8 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country

Default Value: OPR_DEF_TBL_HR.COUNTRY

Prompt Table: COUNTRY_TBL