SELECT A.EMPLID , A.JOBCODE , B.LANGUAGE_CD , B.DESCR FROM PS_JOB A , PS_JOBCODE_LANG B WHERE (A.EFFDT IS NULL OR A.EFFDT = ( SELECT MAX(A_ED.EFFDT) FROM PS_JOB A_ED WHERE A.EMPLID = A_ED.EMPLID AND A.EMPL_RCD = A_ED.EMPL_RCD AND A_ED.EFFDT <= %CurrentDateIn) AND A.EFFSEQ = ( SELECT MAX(A_ES.EFFSEQ) FROM PS_JOB A_ES WHERE A.EMPLID = A_ES.EMPLID AND A.EMPL_RCD = A_ES.EMPL_RCD AND A.EFFDT = A_ES.EFFDT) AND B.JOBCODE = A.JOBCODE AND B.EFFDT = ( SELECT MAX(B_ED.EFFDT) FROM PS_JOBCODE_LANG B_ED WHERE B.SETID = B_ED.SETID AND B.JOBCODE = B_ED.JOBCODE AND B_ED.EFFDT <= %CurrentDateIn))
|