GPES_LST_ERE_VW

(SQL View)
Index Back

Last Absence Date in Period

Retrieves the last absence date within the period in process.

SELECT A.EMPLID , A.CAL_RUN_ID , A.EMPL_RCD , A.GP_PAYGROUP , A.CAL_ID , A.ORIG_CAL_RUN_ID , B.BGN_DT , B.END_DT , B.ORIG_BEGIN_DT , C.ABS_TYPE_OPTN , B.PIN_TAKE_NUM FROM PS_GP_PYE_PRC_STAT A , PS_GP_ABS_EVENT B , PS_GP_ABS_TAKE C WHERE A.EMPLID = B.EMPLID AND A.EMPL_RCD = B.EMPL_RCD AND B.END_DT >= A.PRD_BGN_DT AND B.BGN_DT <= A.PRD_END_DT AND B.BEGIN_DAY_HRS = 0 AND C.PIN_NUM = B.PIN_TAKE_NUM AND C.EFFDT = ( SELECT MAX(EFFDT) FROM PS_GP_ABS_TAKE WHERE PIN_NUM = C.PIN_NUM AND EFFDT <= A.PRD_END_DT) AND C.EFF_STATUS <> 'I' AND C.ABS_TYPE_OPTN IN ('ERE') AND B.PRC_EVT_ACTN_OPTN = 'N' AND B.VOIDED_IND = 'N'

# PeopleSoft Field Name PeopleSoft Field Type Database Column Type Description
1 EMPLID Character(11) VARCHAR2(11) NOT NULL Employee ID
2 CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Calendar Run Id
3 EMPL_RCD Number(3,0) SMALLINT NOT NULL Empl Record
4 GP_PAYGROUP Character(10) VARCHAR2(10) NOT NULL Global Payroll pay group
5 CAL_ID Character(18) VARCHAR2(18) NOT NULL calendar id
6 ORIG_CAL_RUN_ID Character(18) VARCHAR2(18) NOT NULL Original Calendar Group ID
7 BGN_DT Date(10) DATE Begin Date
8 END_DT Date(10) DATE end date
9 ORIG_BEGIN_DT Date(10) DATE original begin date
10 ABS_TYPE_OPTN Character(3) VARCHAR2(3) NOT NULL Absence Type
11 PIN_TAKE_NUM Number(8,0) INTEGER NOT NULL Absence Take