You might want to look at either the lead or lag analytic functions.

http://download-east.oracle.com/docs...s56a.htm#83619