SELECT DISTINCT A.SETID , A.JOBCODE , B.LANGUAGE_CD , B.DESCR FROM PS_CM_ROLE_COMPS A , PS_JOBCODE_LANG B WHERE A.EFFDT = ( SELECT MAX(EFFDT) FROM PS_CM_ROLE_COMPS WHERE A.POSITION_NBR = POSITION_NBR AND A.SETID=SETID AND A.JOBCODE = JOBCODE AND A.JOB_FAMILY = JOB_FAMILY AND A.JOB_TASK = JOB_TASK AND EFFDT <= %CurrentDateIn) AND B.EFFDT = ( SELECT MAX(EFFDT) FROM PS_JOBCODE_TBL WHERE B.SETID = SETID AND B.JOBCODE = JOBCODE AND EFFDT <= %CurrentDateIn) AND A.JOBCODE = B.JOBCODE AND A.SETID=B.SETID
|