SELECT A.EPO_OBJ_PLAN , A.SETID , A.EPO_NODE_ID , BL.LANGUAGE_CD , BL.DESCR FROM PS_EPO_PLAN_PAGES A , PS_DEPT_TBL B , PS_EPO_OBJ_PLAN C , PS_DEPT_TBL_LANG BL WHERE A.EPO_OBJ_PLAN = C.EPO_OBJ_PLAN AND C.EPO_HIERARCHY_MTHD = 'D' AND A.SETID = B.SETID AND A.EPO_NODE_ID = B.DEPTID AND B.EFF_STATUS = 'A' AND B.SETID = BL.SETID AND B.DEPTID = BL.DEPTID AND B.EFFDT = BL.EFFDT AND B.EFFDT = ( SELECT MAX(B2.EFFDT) FROM PS_DEPT_TBL_LANG B2 WHERE B2.SETID = B.SETID AND B2.DEPTID = B.DEPTID AND B2.EFFDT <=%CurrentDateIn) AND NOT EXISTS ( SELECT EPO_NODE_ID FROM PS_EPO_PG_HDR HDR WHERE HDR.EPO_OBJ_PLAN = A.EPO_OBJ_PLAN AND HDR.SETID = A.SETID AND HDR.EPO_NODE_ID = A.EPO_NODE_ID)
|