Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Using host variables with cursors
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
![]() |
![]() |