Ref Cursors and Pl/SQL tables

Ref Cursors and Pl/SQL tables

Post by Jon Glickma » Sun, 08 Apr 2001 10:45:08



Does anybody know how to read a PL/SQL table into
a ref cursor without using a tempory table in between.
 
 
 

Ref Cursors and Pl/SQL tables

Post by Mike Moor » Sun, 08 Apr 2001 11:41:16


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


Quote:> Does anybody know how to read a PL/SQL table into
> a ref cursor without using a tempory table in between.


 
 
 

Ref Cursors and Pl/SQL tables

Post by Mani Visweswara » Mon, 09 Apr 2001 23:53:22


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


> 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



> > Does anybody know how to read a PL/SQL table into
> > a ref cursor without using a tempory table in between.

 
 
 

Ref Cursors and Pl/SQL tables

Post by Jim Kenned » Tue, 10 Apr 2001 00:06:11


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


> 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



> > 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



> > > Does anybody know how to read a PL/SQL table into
> > > a ref cursor without using a tempory table in between.

 
 
 

1. REF cursor and PL/SQL table

Does anyone has any idea(I am sure some of you do) on how one can read
from a PL/SQL table using a REF cursor?

Any ideas will be very helpful.

Thanks
Pk.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

2. console lockUp in FoxPro for Unix

3. REf cursors on Pl/SQL tables

4. Anyone knows good FOX,DBASE or CLARION JOB search engines?

5. REF CURSOR returning a PL/SQL Table.

6. Need lib. with file I/O functions

7. Returning a ref cursor with dynamic SQL in PL/SQL

8. Records deleting on their own

9. working with PL/SQL REF CURSORs

10. PL/SQL REF CURSOR Question

11. XML from REF CURSOR in PL/SQL

12. JavaSP ResultSet to PL/SQL REF CURSOR