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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Ref Cursors and Pl/SQL tables

Re: Ref Cursors and Pl/SQL tables

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Sun, 08 Apr 2001 15:06:11 GMT
Message-ID: <D7%z6.692951$U46.21584997@news1.sttls1.wa.home.com>

I saw this done and the code is at Ask Tom. Go to the Oracle Magazine site and click Ask Tom and do a search there.(I don't have the URL's at home) I believe it went something like this:
Create a type that you want to return.
Then in the procedure create a table of the type and as you go through the result set add the results to the table. At the end cast the value to a table.
The site has an example of doing this which is better than my explanation.

Jim

"Mani Visweswaran" <maniv_at_mindspring.com> wrote in message news:9apu13$8u$1_at_slb1.atl.mindspring.net...
> I think I understand the question, but I don't know the
> answer. In fact, I wanted to do the same thing recently.
>
> Basically, I wanted to read some stuff from various tables,
> build a PL/SQL table in the stored procedure, and return a
> REF CURSOR to that "table" back to the calling program. The
> result set I wanted to return back could not be created in a
> single SQL statement.
>
> Mani Visweswaran
>
> "Mike Moore" <hicamel_at_mail.home.com> wrote in message
> news:g7vz6.8479$4L4.916784_at_news1.frmt1.sfba.home.com...
> > First of all, a table is not read "into" a cursor. It's not like the
 table
> > is
> > duplicated somewhere.
> > What do you mean by a temporary table? It would help if you show an
> > example of what you are not looking for.
> > Mike
> >
> > Jon Glickman <jglickma_at_lynx.neu.edu> wrote in message
> > news:3ACD1D5F.BF3CCA7F_at_lynx.neu.edu...
> > > Does anybody know how to read a PL/SQL table into
> > > a ref cursor without using a tempory table in between.
>
>
>
Received on Sun Apr 08 2001 - 10:06:11 CDT

Original text of this message

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