SELECT A.SETID , A.JOBCODE , A.GRADE FROM PS_JOBCODE_TBL A , PS_SAL_GRADE_TBL SG WHERE A.EFFDT = ( SELECT MAX (A_ED.EFFDT) FROM PS_JOBCODE_TBL A_ED WHERE A_ED.SETID = A.SETID AND A_ED.JOBCODE = A.JOBCODE AND A_ED.EFFDT <= %CurrentDateIn) AND SG.EFFDT = ( SELECT MAX (SG1.EFFDT) FROM PS_SAL_GRADE_TBL SG1 WHERE SG1.SETID = SG.SETID AND SG1.SAL_ADMIN_PLAN = SG.SAL_ADMIN_PLAN AND SG1.GRADE = SG.GRADE AND SG1.EFFDT <= %CurrentDateIn) AND A.EFF_STATUS = 'A' AND A.SAL_ADMIN_PLAN <> ' ' AND A.GRADE <> ' ' AND A.SAL_ADMIN_PLAN = SG.SAL_ADMIN_PLAN AND A.GRADE = SG.GRADE GROUP BY A.SETID, A.JOBCODE, A.GRADE
|