SELECT A.RS_TYPE , L.LANGUAGE_CD , L.DESCR FROM %Table(RS_TYPE_TBL) A , PSTREENODE B , PSTREEDEFN D , %Table(RS_TYPE_LANG) L WHERE A.RS_TYPE = B.TREE_NODE AND D.SETID = ' ' AND D.SETCNTRLVALUE = ' ' AND D.TREE_NAME = 'COMPETENCY' AND D.EFF_STATUS = 'A' AND D.EFFDT = ( SELECT MAX(EFFDT) FROM PSTREEDEFN C WHERE C.SETID = D.SETID AND C.SETCNTRLVALUE = D.SETCNTRLVALUE AND C.TREE_NAME = D.TREE_NAME AND C.EFFDT <= %CurrentDateIn) AND D.SETID = B.SETID AND D.SETCNTRLVALUE = B.SETCNTRLVALUE AND D.TREE_NAME = B.TREE_NAME AND D.EFFDT = B.EFFDT AND L.RS_TYPE = A.RS_TYPE
|