GPUS_COMPNY_VW

(SQL View)
Index Back

Retrieve Companies for payroll

This view retrieves Companies for payroll, pay runs.

SELECT DISTINCT PPS.CAL_RUN_ID , A.COMPANY , B.DESCR , PPS.PYMT_DT FROM PS_GP_PYE_PRC_STAT PPS , PS_JOB A , PS_COMPANY_TBL B WHERE PPS.CALC_TYPE = 'P' AND PPS.EMPLID = A.EMPLID AND PPS.SEL_STAT IN ('A','I') AND A.COMPANY = B.COMPANY AND A.EFFDT = ( SELECT MAX(A1.EFFDT) FROM PS_JOB A1 WHERE A1.EMPLID = PPS.EMPLID AND A1.EFFSEQ = A1.EFFSEQ AND A1.EMPL_RCD = A.EMPL_RCD AND A1.EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(A1.EFFSEQ) FROM PS_JOB A1 WHERE A1.EMPLID = PPS.EMPLID AND A1.EFFDT = A1.EFFDT AND A1.EMPL_RCD = A.EMPL_RCD)

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Calendar Run Id
2 COMPANY Character(3) VARCHAR2(3) NOT NULL Company
3 DESCR Character(30) VARCHAR2(30) NOT NULL Description
4 PYMT_DT Date(10) DATE Payment Date