Re: execute immediate for cursor

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 23 Jul 2002 15:35:26 GMT
Message-ID: <3D3D777C.3F95DF49_at_exesolutions.com>


mariusz wrote:

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

You can not make static cursors dynamic. You can pass in values for the WHERE and HAVING clauses but you can not dynamically alter table names.

Daniel Morgan Received on Tue Jul 23 2002 - 17:35:26 CEST

Original text of this message