Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how would you do it?
Thanks for reply,
However, I need to be able to run a procedure which name is a part of
the cursor-for-loop.
For instance:
............
for x in (select seq,proc from table t order by seq)
loop
<execute x.proc here>
end loop
...........................
I hope it makes sense
On Dec 15, 2:47 pm, "klabu" <klab..._at_gmail.com> wrote:
> "Eugene"
>
>
>
>
>
> > Hi all,
> > I have a table with 2 columns:
> > seq proc
> > ------ -------------------------
> > 1 sales_order_p;
> > 2 po_p;
> > 3
> > ........
>
> > I need to be able to loop via all records in that table (ordered by
> > seq) end execute each procedure.
> > Is it possible? Do I use "execute immediate"?
> > I want to make is dinamic enough so if another procedure will be added
> > OR I will have to resequence table, no extra maintenance will be
> > required.I'd probly concatenance and do a
> "execute immediate" on a anon block like this:
>
> begin
> sales_order_p;
> po_p;
> invoice_p;
> end ;- Hide quoted text -- Show quoted text -
Received on Fri Dec 15 2006 - 17:00:54 CST