SELECT SEC.OPRID , A.POSITION_NBR , L.LANGUAGE_CD , L.DESCR FROM PS_POSITION_DATA A , PS_DEPT_SEC_SRCH SEC , PS_POSN_DATA_LANG L WHERE A.POSITION_NBR = L.POSITION_NBR AND A.EFFDT = L.EFFDT AND SEC.SETID = ( SELECT SETID FROM PS_SET_CNTRL_REC SC WHERE SC.SETCNTRLVALUE = A.BUSINESS_UNIT AND SC.RECNAME = 'DEPT_TBL') AND A.DEPTID = SEC.DEPTID AND A.KEY_POSITION = 'Y' AND EXISTS ( SELECT 'X' FROM PS_CM_ROLE B WHERE B.POSITION_NBR = A.POSITION_NBR) AND A.EFFDT = ( SELECT MAX(D.EFFDT) FROM PS_POSITION_DATA D WHERE D.POSITION_NBR = A.POSITION_NBR)
|