Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: help!! How to set tablename variable?
You can pass a table name to a stored prcoedure as an argument, but the you
would have to use Dynamic SQL to select from the table.
Depends what version of ORACLE oyou are on as to which Dynamic SQL construct you shoudl use.
From 7.3 see the DBMS_SQL package.
lkw <lkw_at_axiomatique.com> wrote in message
news:83a1c0$otu$1_at_newton3.pacific.net.sg...
> hi everybody,
>
> say i want to pass a tablename variable (v_tblname) into a stored
procedure
> to perform a sql statement.
> Inside my stored proc i wrote:
>
> select * from v_tblname;
>
> but i always encountered errors. so i just want to know that is there a
way
> to set a table name as a variable? if yes, how?
>
> yr helf would be greatly appreciated!! thanks!!
>
> lkw.
>
>
Received on Thu Dec 16 1999 - 03:51:10 CST