Re: cursor movement question?

From: Scott Urman <surman_at_us.oracle.com>
Date: 1996/09/05
Message-ID: <322F78F9.2769_at_us.oracle.com>#1/1


Venkateswara R Polisetti wrote:
>
> modrall_at_world.std.com (Mark W Modrall) wrote:
>
> >i/'ve been poking around the proc precompiler book looking for a definition
> >of the cursor in the hopes that i might find out how to move the pointer
> >around without having to actually fetch all the intervening records, but the
> >manual is fairly vague on the subject... there is a line saying that you
> >can only skip forward, not backwards, but it doesn't give explanations... it
> >also doesn't directly reference the idea of skipping directly to, say, the
> >20th record of a result set...
 

> >where should i be looking?
 

> >thanks
> >-mark
>
> There is no way that you can skip backwards in a cursor. You can skip
> forward n rows only by executing the FETCH n times.

You can also do array fetches, so you don't have to issue as many individual fetch statements. But the same thing still applies in that you can't move the pointer without fetching it.

The full SQL92 standard does specify a FETCH PRIOR and FETCH n syntax, though.

>
> Venkateswara Rao
> /-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\
> | Venkateswara R.Polisetti Email: vrao_at_sctcorp.com |
> | SCT Utility Systems, Inc. Phone(O): (803) 935-8160 |
> | 9 Science Court (R): (803) 736-1609 |
> | Columbia, SC 29203-9344 |
> \-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-/
 

-- 
------------------------------------------------------------------------
Scott Urman            Oracle Corporation           surman_at_us.oracle.com
------------------------------------------------------------------------
Author of _Oracle PL/SQL Programming_ ISBN 0-07-882176-2
Published by Oracle Press - http://www.osborne.com/oracle/index.htm
------------------------------------------------------------------------
"The opinions expressed here are my own, and are not necessarily that of
 Oracle Corporation"
------------------------------------------------------------------------
Received on Thu Sep 05 1996 - 00:00:00 CEST

Original text of this message