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: Creating and accessing a table from within a procedure

Re: Creating and accessing a table from within a procedure

From: <michael_bialik_at_my-deja.com>
Date: Fri, 03 Dec 1999 20:51:04 GMT
Message-ID: <829afn$nf5$1@nnrp1.deja.com>


Hi.

 You must access your newly defined table via dynamic SQL as well.  Otherwise PL/SQL checks table name for existance and fails ( that's  the reason for error message ).

 HTH. Michael.

In article <828ve0$f2j$1_at_nnrp1.deja.com>,   vmisetich_at_my-deja.com wrote:
> Hello!
>
> Can someone tell me if it's possible to both create and insert into a
> temporary table from within one stored procedure? I've already tried
> the following, but it doesn't seem to work:
>
> create or replace procedure test_temp_table
> as
>
> begin
> execute immediate 'create global temporary table ttt(testfield
> number(10))';
> insert into ttt(testfield) values(1);
>
> end;
> /
>
> When I try to compile the proc, I get:
> PL/SQL: SQL Statement ignored
> PLS-00201: identifier 'TTT' must be declared
>
> Can someone show me the correct way (if there is one) to do this?
>
> Thanks in advance,
> Vince
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Dec 03 1999 - 14:51:04 CST

Original text of this message

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