SELECT B.EMPLID , B.CAL_RUN_ID , B.EMPL_RCD , B.GP_PAYGROUP , B.CAL_ID , C.LANGUAGE_CD , C.DESCR FROM PS_GPHK_PYGRP_PSLP F , PS_GPHK_P_ACUM_LNG C , PS_GP_PYE_SEG_STAT B , PS_GP_PYE_PRC_STAT A WHERE B.GP_PAYGROUP = F.GP_PAYGROUP 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 AND B.GP_PAYGROUP = F.GP_PAYGROUP AND F.EFFDT = ( SELECT MAX(F1.EFFDT) FROM PS_GPHK_PYGRP_PSLP F1 WHERE F1.EFFDT <= F.EFFDT AND F1.GP_PAYGROUP = F.GP_PAYGROUP ) AND F.GPHK_PAYSLIP_ID = C.GPHK_PAYSLIP_ID AND C.EFFDT = ( SELECT MAX(C1.EFFDT) FROM PS_GPHK_P_ACUM_LNG C1 WHERE C1.EFFDT <= C.EFFDT AND C1.GPHK_PAYSLIP_ID = C.GPHK_PAYSLIP_ID )
|