Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: execute immediate for cursor

Re: execute immediate for cursor

From: Vladimir M. Zakharychev <bob_at_dpsp-yes.com>
Date: Tue, 23 Jul 2002 13:25:47 +0400
Message-ID: <ahj7h1$fpu$1@babylon.agtel.net>


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...

> 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.
>
>
>
>
Received on Tue Jul 23 2002 - 04:25:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US