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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to pass a table name into procedure ?

Re: How to pass a table name into procedure ?

From: Barbara Kennedy <barbken_at_teleport.com>
Date: Wed, 11 Oct 2000 07:02:10 -0700
Message-ID: <yo_E5.28650$F65.1862245@nntp2.onemain.com>

If you don't know the table name in advance then you are going to have to use dynamic SQL. In Oracle 7 thus is the dbms_sql package (also applicable in Oracle 8) and in Oracle 8 I believe you do a n execute immediate. It is in the documentation. The compiler is trying to resolve things and it cannot if you pass in the table name so you have ot indicate you are using dynamic sql so it will compile that part at run time. Jim
<majapu_at_poczta.onet.pl> wrote in message news:39e42c97$1_at_news.vogel.pl...
> I'd like to pass a table name into procedure, for example
>
> CREATE PROCEDURE QQ(table_name IN ...)
> ...
> SELECT * FROM table_name ;
> ...
>
> How to do that ?
> Thanks
> Mariusz
>
>
>
>
Received on Wed Oct 11 2000 - 09:02:10 CDT

Original text of this message

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