Molinaro ("you developer, you"),
That is a "lag" in Oracle but not in DB2 version 7 on the OS/390 (mainframe). Can you send me the code using straight SQL to do the same thing? Below is the code you send me earlier.
column previous_ename format a15
column previous_hiredate format a18
select ename,hiredate,
lag(ename)over(order by hiredate) previous_ename,
lag(hiredate)over(order by hiredate) previous_hiredate
from emp where deptno = 10
/
Please take a few minutes to provide feedback on the quality of service you received. The Department of Education values your feedback as a customer. Commissioner John L. Winn is committed to continuously assessing and improving the level and quality of services provided to you by Department staff. Simply click on this link to the "DOE Customer Survey". Thank you in advance for completing the survey.
DOE Customer Survey
Oracle LazyDBA home page