GPDE_LN_PAID_V

(SQL View)
Index Back

Ger Loans - search Paid view

search paid loans

SELECT A.EMPLID , A.EMPL_RCD , A.INSTANCE , B.GPDE_LN_YEAR , B.GPDE_LN_MONTH , 'Y' FROM PS_GPDE_LN_SETUP A , PS_GPDE_LN_SCHED B WHERE A.EMPLID = B.EMPLID AND A.EMPL_RCD = B.EMPL_RCD AND A.INSTANCE = B.INSTANCE AND EXISTS ( SELECT 'X' FROM PS_GPDE_LN_RSLT RSLT WHERE RSLT.EMPLID = A.EMPLID AND RSLT.EMPL_RCD = B.EMPL_RCD AND RSLT.INSTANCE = B.INSTANCE AND RSLT.GPDE_LN_YEAR = B.GPDE_LN_YEAR AND RSLT.GPDE_LN_MONTH = B.GPDE_LN_MONTH AND RSLT.GPDE_LN_ACTIVE = 'Y' AND RSLT.GPDE_AL_CPAY_ENDDT = ( SELECT MAX(GPDE_AL_CPAY_ENDDT) FROM PS_GPDE_LN_RSLT sub WHERE sub.EMPLID = B.EMPLID AND sub.EMPL_RCD = B.EMPL_RCD AND sub.INSTANCE = B.INSTANCE AND sub.GPDE_LN_YEAR = B.GPDE_LN_YEAR AND sub.GPDE_LN_MONTH = B.GPDE_LN_MONTH) )

# 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 INSTANCE Number(3,0) SMALLINT NOT NULL Instance Number
4 GPDE_LN_YEAR Number(4,0) SMALLINT NOT NULL Year
5 GPDE_LN_MONTH Number(2,0) SMALLINT NOT NULL Month
6 GPDE_LN_PAID Character(1) VARCHAR2(1) NOT NULL Loans - Paid Flag