Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help: append query results to cursor
On 29 Aug 2006 12:57:54 -0700, dorancat_at_gmail.com wrote:
>My hope was that I could loop through the codes/numbers
>given, each select should return one id based on code/number
>and then I would append it to my cursor. At the end, I return
>my cursor and badda-bing! I got me a result set of all my
>ids/codes/numbers.
>
>I know that I could probably do some dynamic sql to build a
>single query to return all rows, but I thought I would see if this
>route produced any results (almost just for the sake of curiosity).
>
>Any suggestions or helpful nudges in the right direction
>would be appreciated.
You may be interested in pipelined table functions, which let you synthesise a result set row-by-row in a loop.
-- Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis toolReceived on Tue Aug 29 2006 - 15:40:55 CDT