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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Using host variables with cursors

Re: Using host variables with cursors

From: Daniel A. Morgan <damorgan_at_exesolutions.com>
Date: Sat, 23 Feb 2002 17:48:44 +0000
Message-ID: <3C77D5FC.A99912C5@exesolutions.com>


Likely you should not be using a ref cursor here ... but the problem is that Oracle can not, at compile time, determine whether the SQL is valid.

This is not a good way to architect a cursor ... and unless you are returning the record set to another procedure or program you should not be using a ref cursor.

Daniel Morgan

Blasting Bubbles wrote:

> I'm trying to use a cursor like this...
>
> Exec sql declare cursor for select * from :table_name;
>
> but it gives me an error at :table_name. Is there a reason that I can't use
> a variable here? Is there another solution?
>
> BB
Received on Sat Feb 23 2002 - 11:48:44 CST

Original text of this message

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