Take a look at the lead and lag functions:
drop table tab1;
create table tab1(
col1 varchar2(10)
);
insert into tab1 values('Hello');
insert into tab1 values('World');
commit;
select col1,lead(col1) over(order by col1) from tab1;
select col1,lag(col1) over(order by col1) from tab1;
Main Topics
Browse All Topics





by: paquicubaPosted on 2004-10-21 at 12:02:01ID: 12373332
Can you post some sample data?