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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL tablename as variable

Re: PL/SQL tablename as variable

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Wed, 28 Nov 2001 16:55:47 GMT
Message-ID: <nG8N7.89025$XJ4.48763814@news1.sttln1.wa.home.com>


Since you are on 7.3.4 you need to use the dbms_sql package to construct the string from the inputs.
If you are going to do this repeatedly performance is going to suffer because you are reparsing the statement each time. Jim

"Thomas" <thomas.hiller_at_warema.de> wrote in message news:6e366956.0111280727.4123d35c_at_posting.google.com...
> hello!
>
> the following statement compilation fails within a stored procedure in
> a package (Oracle Version 7.3.4.1):
>
> insert into table_name (select * from table_name_2);
>
> table_name and table_name_2 are variables. Oracle does not accept the
> statement with the following error message:
>
> PLS-00356: 'TABLE_NAME' must name a table to which the user has access
>
> how can I fix the problem. i do need the dynamic way of assigning a
> value to table_name!
>
> regards
>
> thomas
Received on Wed Nov 28 2001 - 10:55:47 CST

Original text of this message

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