SELECT DISTINCT C.BUDGET_PERIOD ,C.BUSINESS_UNIT ,D.COMPANY ,D.LANGUAGE_CD ,D.DESCR FROM PS_JOB A , PS_BUDGET_PERIOD B , PS_BUDGET_BUS_UNIT C , PS_COMPNY_TBL_LANG D WHERE A.BUSINESS_UNIT=C.BUSINESS_UNIT AND B.BUDGET_PERIOD=C.BUDGET_PERIOD AND A.COMPANY=D.COMPANY AND A.EFFDT=( SELECT MAX(EFFDT) FROM PS_JOB A1 WHERE A.EMPLID=A1.EMPLID AND A.EMPL_RCD=A1.EMPL_RCD AND A.EFFDT =A1.EFFDT AND A.EFFSEQ=A1.EFFSEQ) AND A.EFFDT <=B.THRU_DATE AND A.EFFSEQ = ( SELECT MAX(A2.EFFSEQ) FROM PS_JOB A2 WHERE A.EMPLID = A2.EMPLID AND A.EMPL_RCD = A2.EMPL_RCD AND A.EFFDT = A2.EFFDT ) AND D.EFFDT = ( SELECT MAX(D1.EFFDT) FROM PS_COMPNY_TBL_LANG D1 WHERE D1.COMPANY=D.COMPANY AND D1.EFFDT<=B.THRU_DATE AND D1.LANGUAGE_CD=D.LANGUAGE_CD)
|