View Single Post

   
  #5 (permalink)  
Old 02-26-2008, 08:46 AM
Jake
 
Posts: n/a
Default Re: REF cursors vs. cursors

On Nov 9, 3:35 am, William Robertson <williamr2...@googlemail.com>
wrote:
> On Nov 7, 4:49 pm, Jake <jgarfi...@earthlink.net> wrote:
>
>
>
> > With cursors I could define a lot of my queries in the package
> > specification. This is a convenient way to put queries in one place.
> > The parameterized cursor idea is nice too. Plus it helps in not
> > writing the same query many times throughout the code.

>
> > What if I would like to do a similar thing, but I need to use REF
> > CURSORS strictly for the ability to be able to pass the ref cursor to
> > a procedure. What's the preferred way of defining queries when using
> > REF CURSORS if I wanted to have a similar effect?

>
> > For example: Would it be feasible to define many VARCHAR2s that
> > represent queries in one package? Or is there a way to associate REF
> > CURSORS with a regular cursor that's defined in a package?

>
> > What would be the preferred way to do this?

>
> > thanks.

>
> One approach might be to define packaged functions that returned ref
> cursors.



thanks.

Reply With Quote