Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Cursor (next, Prior) item

Re: Oracle Cursor (next, Prior) item

From: Walter Dnes <waltdnes_at_interlog.com>
Date: Sun, 14 Feb 1999 06:34:46 GMT
Message-ID: <36c86b0b.12109263@news.interlog.com>


On Fri, 12 Feb 1999 16:00:24 GMT, weiq_at_webworks.ca wrote:

>Hi,
>
> I am wondering if any one can help me how to get the next and
> previous item in the cursor based on the item mathed the item
> passed in the store procedure

  Is there any reason you can't declare 3 record variables of type "cur_AllEmployeeId%rowtype" ? They would be...

  1. the logical "previous" record
  2. the logical "current" record
  3. the logical "next" record Initialize by fetching the 1st row into A, the 2nd into B and the 3rd into C. On each pass through your processing loop, run a "bucket-brigade". Copy the contents of B into A, copy the contents of C into B, and then fetch into C. Note, the order of the above operations is *VERY* important.

Walter Dnes <waltdnes_at_interlog.com> procmail spamfilter http://www.interlog.com/~waltdnes/spamdunk/spamdunk.htm Why a fiscal conservative opposes Toronto 2008 OWE-lympics http://www.interlog.com/~waltdnes/owe-lympics/owe-lympics.htm Received on Sun Feb 14 1999 - 00:34:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US