GP_PGRP_CTRY_VW

(SQL View)
Index Back

EEs PayGrps from Job by Ctry

View shows all GP Paygroups associated with a specific country (based on Pay Entity) that a payee has ever been assigned to based on highest EFFSEQ for each EFFDT

SELECT J.EMPLID , J.EMPL_RCD , PE.COUNTRY , J.GP_PAYGROUP , PG.PAY_ENTITY FROM PS_JOB J , PS_GP_PYGRP PG , PS_GP_PYENT PE WHERE J.GP_PAYGROUP=PG.GP_PAYGROUP AND PG.PAY_ENTITY=PE.PAY_ENTITY AND J.EFFSEQ = ( SELECT MAX(EFFSEQ) FROM PS_JOB JJ WHERE JJ.EMPLID=J.EMPLID AND JJ.EMPL_RCD=J.EMPL_RCD AND JJ.EFFDT=J.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 COUNTRY Character(3) VARCHAR2(3) NOT NULL Country
4 GP_PAYGROUP Character(10) VARCHAR2(10) NOT NULL Global Payroll pay group
5 PAY_ENTITY Character(10) VARCHAR2(10) NOT NULL Pay Entity