how to read the next record [message #438889] |
Tue, 12 January 2010 20:54  |
kuldezak
Messages: 2 Registered: January 2010
|
Junior Member |
|
|
I'm trying to make a procedure with a case like this :
I have a table
EMPNO START_DATE END_DATE
------- ----------- ----------
0001 20100101 20100111 data1
0001 20100120 20100130 data2
0001 20100205 data3
What i'm trying to do is updating data1.end_date with data2.start_date and data2.end_date with data3.start_date that has the same EMPNO. This process will loop until the end of the record.
The result i was hoping to achieve :
EMPNO START_DATE END_DATE
------- ----------- ----------
0001 20100101 20100120 data1
0001 20100120 20100205 data2
0001 20100205 data3
Thanks before,
Reza
|
|
|
|
|
|