SELECT D.EMPLID , D.EMPL_RCD , A.GP_PAYGROUP , A.CAL_ID , H.LANGUAGE_CD , E.DESCR FROM PS_GP_CALENDAR A , PS_GP_RUN_TYPE B , PS_JOB D , PS_GP_CAL_PRD E ,PS_GP_CAL_RUN_DTL F , PS_GP_CAL_RUN G ,PS_GP_CAL_PRD_LANG H WHERE A.RUN_TYPE = B.RUN_TYPE AND B.CALC_TYPE ='P' AND A.CAL_PRD_ID = E.CAL_PRD_ID AND A.CAL_PRD_ID=H.CAL_PRD_ID AND A.GP_PAYGROUP = D.GP_PAYGROUP AND D.EFFDT = ( SELECT MAX(E.EFFDT) FROM PS_JOB E WHERE E.EMPLID = D.EMPLID AND E.EMPL_RCD = D.EMPL_RCD AND E.EFFDT <= %CurrentDateIn) AND D.EFFSEQ = ( SELECT MAX(EFFSEQ) FROM PS_JOB WHERE EMPLID = D.EMPLID AND EMPL_RCD = D.EMPL_RCD AND EFFDT = D.EFFDT) AND A.CAL_ID=F.CAL_ID AND F.CAL_RUN_ID=G.CAL_RUN_ID
|