Re: HOWTO: STORED PROCEDURE RETURNING MANY ROWS

From: Gunter Herrmann <notformail0106_at_earthlink.net>
Date: Fri, 17 Jun 2011 10:10:37 -0400
Message-ID: <4dfb6062$0$6630$9b4e6d93_at_newsspool2.arcor-online.net>



Hi Andreas!

Andreas Mosmann wrote:

> If Possible it would be nice to do something like
>
> select * from MyProc('A','B','C')

What about

select * from table(MyFunction('A','B','C'))

MyFunction then will be a table function (for a small amount of data only, otherwise you might run out of memory), for more rows you can use a pipelined table function (introduced in Oracle 9i). This one returns rows before the execution is finished.

You will need to create database types for the row type of the function. Additionally you will create a table type as TABLE OF <row type from above>.

Hope that helps

Gunter in Orlando, Florida Received on Fri Jun 17 2011 - 09:10:37 CDT

Original text of this message