Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Appending rows to a cursor
In article <35EA47B8.C98B48CC_at_NOSPAMeng.ericsson.se>,
Mathias Nilsson <mathias.nilsson_at_NOSPAMeng.ericsson.se> wrote:
> Is it possible to append rows to a cursor in PL/SQL
> (Oracle v7.3.4)? To specify a bit more. I need to loop
> through a cursor, passing parameters from that cursor to
> a SELECT statement (or cursor), and appending all resulting
> rows to a new cursor. When the loop is finished, I need to
> return the cursor (with the appended rows) from the function.
> In pseudo code it looks something like this:
>
> CURSOR pre_cursor IS SELECT ...
> CURSOR main_cursor(parameters) IS SELECT ...
>
> OPEN pre_cursor
> LOOP
> APPEND rows from pre_cursor to main_cursor
> END LOOP
> RETURN main_cursor
>
> I have posted a similar question once before, but never
> gotten a reply. Hopefully I'll have better luck this time.
>
> Thanks in advance
> Mathias
>
> PS Don't forget to remove NOSPAM when replying via email.
>
Please explain a little more what you mean by your APPEND step. Without seeing the select statements, it is difficult to understand your intention. My impression is that you are doing some kind of join, but that's just a guess. Give us a sample of input and output with the pseudocode filled in a bit, then maybe we can help a little better.
--
Ed Prochak
Magic Interface, Ltd.
440-498-3702
-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Mon Aug 31 1998 - 08:07:33 CDT
![]() |
![]() |