I need to know if you can do sort of a cursor look ahead and view data from the next row in the cursor. I'll try to succinctly explain why, maybe there's a better solution.
We have several items that are valid through certain date ranges. The database was designed to only hold the starting date of an item, thinking that the end date could be calculated by looking at the start date of the next revision of that item. For instance:
Cert1 version 1's start date -> January 1, 2000
Cert1 version 2's start date -> January 1, 2002
From that we can deduce that Cert1 was valid between January 1, 2000 and December 31, 2001. Unfortunately, this isn't working out quite like I expected in my function because I don't have access to the second version information until AFTER I've already processed version one's information and the processing of version one is dependent upon the data in version two. I'm sure you can see where this is headed... =)
So is there a way I can read something out of the next row, without moving the cursor, or will I need to redesign that particular table in the DB?