Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Updating table with values of prior records
Ok, should have written the last msg earlier... ;-)
It seems that using the analytic function LAST like this
UPDATE SEASONS S
SET S.SEASON_ID = (SELECT MIN(SEASON_ID) KEEP (DENSE_RANK LAST ORDER BY
STARTDATE) FROM SEASONS WHERE STARTDATE < S.STARTDATE AND SEASON_ID IS NOT
NULL)
WHERE S.SEASON_ID IS NULL
did the trick.
Maybe anyone can confirm this solution?
tia
Robert Received on Mon Feb 27 2006 - 16:45:24 CST
![]() |
![]() |