SELECT DISTINCT A.PAYGROUP , P.DESCR FROM PS_JOB A , PS_GP_PYE_SEG_STAT S , PS_PAYGROUP_TBL P WHERE A.EFFDT = ( SELECT MAX(B.EFFDT) FROM PS_JOB B WHERE B.EMPLID = A.EMPLID AND B.EMPL_RCD = A.EMPL_RCD AND B.EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(C.EFFSEQ) FROM PS_JOB C WHERE C.EMPLID = A.EMPLID AND C.EMPL_RCD = A.EMPL_RCD AND C.EFFDT = A.EFFDT) AND A.ABSENCE_SYSTEM_CD = 'AM' AND A.PAY_SYSTEM_FLG = 'NA' AND A.EMPLID = S.EMPLID AND A.GP_PAYGROUP = S.GP_PAYGROUP AND A.PAYGROUP = P.PAYGROUP
|