Hi All ,

I have following table with data

DIE_NO START_DAT END_DATE
------ --------- ---------
2458 01-DEC-03
2458 01-DEC-03
2458 02-DEC-03
2696 02-DEC-03
2696 03-DEC-03
2696 03-DEC-03
2696 03-DEC-03
2696 04-DEC-03
2458 05-DEC-03
2458 06-DEC-03
2458 06-DEC-03

I have die 2458 run on 1 st and 2 nd Dec and 5 th and 6 th dec.
I have null as end date right now. I want to update highest date in consecutive running of the die in end date.

This means I have Die 2458 run on 1 st and 2 nd then the End Date should be 2 nd for the first record and for 5 th and 6 th the end date should come 6 th DEC in the record where start date is 5 th.

I mean How I should achieve foll. output


DIE_NO START_DAT END_DATE
------ --------- ---------
2458 01-DEC-03 02-DEC-03
2458 01-DEC-03
2458 02-DEC-03
2696 02-DEC-03
2696 03-DEC-03
2696 03-DEC-03
2696 03-DEC-03
2696 04-DEC-03
2458 05-DEC-03 06-DEC-03
2458 06-DEC-03
2458 06-DEC-03

Is it possible in same table. Even if I have to take different table how will I fetch in that. Some search told me to use PRIOR but In this context how to use it.

Amol