SELECT EMPLID ,EFFDT ,END_DT ,COMPANY ,DEPTID ,POSITION_NBR ,' ' ,' ' FROM ( SELECT J1.EMPLID ,J1.EFFDT , lag(EFFDT ,1 ,'') over( ORDER BY EFFDT DESC) AS END_DT ,GPS_UTIL.GET_DESCR_COMPANY( J1.COMPANY ,SYSDATE) AS COMPANY ,GPS_UTIL.GET_DESCR_DEPT_BY_