Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: execute immediate for cursor
Declare your cursor as weak REF CURSOR, and then open it this way:
OPEN your_cursor FOR 'select whatever from '||table_name;
-- Vladimir Zakharychev (bob@dpsp-yes.com) http://www.dpsp-yes.com Dynamic PSP(tm) - the first true RAD toolkit for Oracle-based internet applications. All opinions are mine and do not necessarily go in line with those of my employer. "mariusz" <on_at_wp.pl> wrote in message news:ahj5ti$37i$1_at_news.tpi.pl...Received on Tue Jul 23 2002 - 04:25:47 CDT
> Hi,
> Id' like to make a cursor:
> cursor (ptable_name in varchar2) cu is select * from ptable_name; --
> Error!!
> I know that if I whant to do that in simple sql statemant, I can use:
> execute immediate:
> execute immediate 'select * from '||ptable_name;
> But, How to use it in cursor?
> Thanks very much for your help!!
>
> Mariusz G.
>
>
>
>