GPMX_VAC_AC_VW

(SQL View)
Index Back

Vacation - Accumulator View

Vacation - Accumulator View

SELECT A.EMPLID , A.EMPL_RCD , C.ACM_FROM_DT , C.ACM_THRU_DT , B.CAL_RUN_ID , C.GP_PAYGROUP , B.CAL_ID , B.ORIG_CAL_RUN_ID , C.RSLT_SEG_NUM , C.EMPL_RCD_ACUM , C.SLICE_BGN_DT , C.SLICE_END_DT , C.USER_KEY1 , D.SERVICE_DT FROM PS_GP_PYE_PRC_STAT A , PS_GP_PYE_SEG_STAT B , PS_GP_RSLT_ACUM C , PS_GP_PIN E , PS_EMPLOYMENT D , PS_JOB Z WHERE A.PRC_ORD_TS = ( SELECT MAX(F.PRC_ORD_TS) FROM PS_GP_PYE_PRC_STAT F ,PS_GP_CAL_RUN G WHERE F.CALC_TYPE='P' AND F.EMPLID=A.EMPLID AND F.EMPL_RCD=A.EMPL_RCD AND G.CAL_RUN_ID=F.CAL_RUN_ID ) AND A.CALC_TYPE = 'P' AND B.RSLT_SEG_NUM = ( SELECT MAX(H.RSLT_SEG_NUM) FROM PS_GP_PYE_SEG_STAT H WHERE H.EMPLID=B.EMPLID AND H.CAL_RUN_ID=B.CAL_RUN_ID AND H.EMPL_RCD=B.EMPL_RCD AND H.GP_PAYGROUP=B.GP_PAYGROUP AND H.CAL_ID=B.CAL_ID AND H.ORIG_CAL_RUN_ID=B.ORIG_CAL_RUN_ID ) AND A.EMPLID=B.EMPLID AND A.EMPLID=D.EMPLID AND A.EMPL_RCD=D.EMPL_RCD AND A.CAL_RUN_ID=B.CAL_RUN_ID AND A.EMPL_RCD=B.EMPL_RCD AND A.GP_PAYGROUP=B.GP_PAYGROUP AND A.CAL_ID=B.CAL_ID AND A.ORIG_CAL_RUN_ID=B.ORIG_CAL_RUN_ID AND B.EMPLID=C.EMPLID AND B.CAL_RUN_ID=C.CAL_RUN_ID AND B.EMPL_RCD=C.EMPL_RCD AND B.GP_PAYGROUP=C.GP_PAYGROUP AND B.CAL_ID=C.CAL_ID AND B.ORIG_CAL_RUN_ID=C.ORIG_CAL_RUN_ID AND B.RSLT_SEG_NUM=C.RSLT_SEG_NUM AND (C.EMPL_RCD = C.EMPL_RCD_ACUM OR C.ACM_TYPE = 'N') AND C.CALC_RSLT_VAL > 0 AND E.PIN_CODE IN ('VAC ANIV_SALDO MEX','VAC ANIV_DEVNG MEX','VAC ANIV_AJUST MEX','VAC ANIV_AUSEN MEX') AND E.PIN_NUM=C.PIN_NUM AND Z.EMPLID=A.EMPLID AND Z.EMPL_RCD = A.EMPL_RCD AND Z.EFFDT = ( SELECT MAX(ZZ.EFFDT) FROM PS_JOB ZZ WHERE ZZ.EMPLID = Z.EMPLID AND ZZ.EMPL_RCD = Z.EMPL_RCD AND ZZ.EFFDT <= %CurrentDateIn) AND Z.EFFSEQ = ( SELECT MAX(EFFSEQ) FROM PS_JOB S WHERE S.EMPLID = Z.EMPLID AND S.EMPL_RCD = Z.EMPL_RCD AND S.COMPANY = Z.COMPANY AND S.EFFDT = Z.EFFDT) GROUP BY A.EMPLID, B.CAL_RUN_ID, A.EMPL_RCD, C.GP_PAYGROUP, B.CAL_ID, B.ORIG_CAL_RUN_ID, C.RSLT_SEG_NUM, C.EMPL_RCD_ACUM, C.ACM_FROM_DT, C.ACM_THRU_DT, C.SLICE_BGN_DT, C.SLICE_END_DT, C.USER_KEY1, D.SERVICE_DT

# 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 Record
3 ACM_FROM_DT Date(10) DATE NOT NULL From Date
4 ACM_THRU_DT Date(10) DATE NOT NULL Through Date
5 CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Calendar Run Id
6 GP_PAYGROUP Character(10) VARCHAR2(10) NOT NULL Global Payroll pay group
7 CAL_ID Character(18) VARCHAR2(18) NOT NULL calendar id
8 ORIG_CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Original Calendar Group ID
9 RSLT_SEG_NUM Number(4,0) SMALLINT NOT NULL Result Segment Number
10 EMPL_RCD_ACUM Number(3,0) SMALLINT NOT NULL Accumulator Empl record
11 SLICE_BGN_DT Date(10) DATE Element Slice Begin Date
12 SLICE_END_DT Date(10) DATE Element Slice End Date
13 USER_KEY1 Character(25) VARCHAR2(25) NOT NULL User Key 1
14 SERVICE_DT Date(10) DATE Service Date