SELECT B.EMPLID , B.CAL_RUN_ID , B.EMPL_RCD , B.GP_PAYGROUP , B.CAL_ID , ACUM1.CALC_RSLT_VAL , ACUM2.CALC_RSLT_VAL , ACUM3.CALC_RSLT_VAL , ACUM4.CALC_RSLT_VAL , ACUM5.CALC_RSLT_VAL , ACUM6.CALC_RSLT_VAL , C.DESCR FROM PS_GP_PG_DTL_SGPNZ F ,PS_GP_RSLT_ACUM ACUM6 , PS_GP_RSLT_ACUM ACUM5 , PS_GP_RSLT_ACUM ACUM4 , PS_GP_RSLT_ACUM ACUM3 , PS_GP_RSLT_ACUM ACUM2 , PS_GP_RSLT_ACUM ACUM1 , PS_GPNZ_PSLP_ACUM C , PS_GP_PG_DTL_SGPNZ D , PS_GP_PYE_SEG_STAT B , PS_GP_PYE_PRC_STAT A WHERE C.GPNZ_PIN_AC6_NUM = ACUM6.PIN_NUM AND B.GP_PAYGROUP = ACUM6.GP_PAYGROUP AND B.EMPLID = ACUM6.EMPLID AND B.CAL_ID = ACUM6.CAL_ID AND B.CAL_RUN_ID = ACUM6.CAL_RUN_ID AND B.EMPL_RCD = ACUM6.EMPL_RCD AND B.RSLT_SEG_NUM = ACUM6.RSLT_SEG_NUM AND C.GPNZ_PIN_AC5_NUM = ACUM5.PIN_NUM AND B.GP_PAYGROUP = ACUM5.GP_PAYGROUP AND B.EMPLID = ACUM5 .EMPLID AND B.CAL_ID = ACUM5.CAL_ID AND B.CAL_RUN_ID = ACUM5.CAL_RUN_ID AND B.EMPL_RCD = ACUM5.EMPL_RCD AND B.RSLT_SEG_NUM = ACUM5.RSLT_SEG_NUM AND C.GPNZ_PIN_AC4_NUM = ACUM4.PIN_NUM AND B.GP_PAYGROUP = ACUM4.GP_PAYGROUP AND B.EMPLID = ACUM4 .EMPLID AND B.CAL_ID = ACUM4.CAL_ID AND B.CAL_RUN_ID = ACUM4.CAL_RUN_ID AND B.EMPL_RCD = ACUM4.EMPL_RCD AND B.RSLT_SEG_NUM = ACUM4.RSLT_SEG_NUM AND C.GPNZ_PIN_AC3_NUM = ACUM3.PIN_NUM AND B.GP_PAYGROUP = ACUM3.GP_PAYGROUP AND B.EMPLID = ACUM3 .EMPLID AND B.CAL_ID = ACUM3.CAL_ID AND B.CAL_RUN_ID = ACUM3.CAL_RUN_ID AND B.EMPL_RCD = ACUM3.EMPL_RCD AND B.RSLT_SEG_NUM = ACUM3.RSLT_SEG_NUM AND C.GPNZ_PIN_AC2_NUM = ACUM2.PIN_NUM AND B.GP_PAYGROUP = ACUM2.GP_PAYGROUP AND B.EMPLID = ACUM2 .EMPLID AND B.CAL_ID = ACUM2.CAL_ID AND B.CAL_RUN_ID = ACUM2.CAL_RUN_ID AND B.EMPL_RCD = ACUM2.EMPL_RCD AND B.RSLT_SEG_NUM = ACUM2.RSLT_SEG_NUM AND C.GPNZ_PIN_AC1_NUM = ACUM1.PIN_NUM AND B.GP_PAYGROUP = ACUM1.GP_PAYGROUP AND B.EMPLID = ACUM1 .EMPLID AND B.CAL_ID = ACUM1.CAL_ID AND B.CAL_RUN_ID = ACUM1.CAL_RUN_ID AND B.EMPL_RCD = ACUM1.EMPL_RCD AND B.RSLT_SEG_NUM = ACUM1.RSLT_SEG_NUM AND B.GP_PAYGROUP = F.GP_PAYGROUP AND C.GPNZ_PAYSLIP_ID = F.GPNZ_PAYSLIP_ID AND C.EFFDT = ( SELECT MAX(C1.EFFDT) FROM PS_GPNZ_PSLP_ACUM C1 WHERE C1.EFFDT <= C.EFFDT) AND B.CAL_RUN_ID = A.CAL_RUN_ID AND B.EMPLID = A.EMPLID AND B.EMPL_RCD = A.EMPL_RCD AND B.CAL_ID = A.CAL_ID AND B.GP_PAYGROUP = A.GP_PAYGROUP
|