Re: using execute immediate for create table and then insert

From: Gints Plivna <gints.plivna_at_gmail.com>
Date: Mon, 2 Mar 2009 14:48:37 +0200
Message-ID: <6e49b6d00903020448jf7f9c1ex4aee283b45582f_at_mail.gmail.com>



Because Oracle verifies referenced objects in anonymous block and cannot find xxdl_po_vendors_enc table. That's the __nice__ feature of dynamic sql (ddl) as soon as you start using it, you have to use it for all dynamically created objects.
So better think again whether you really need to create this table at runtime and whether there isn't less complex approach creating it normally as temporary or permanent table.

Gints Plivna
http://www.gplivna.eu

2009/3/2 Kumar Madduri <ksmadduri_at_gmail.com>:
> Hi All
> This does not work when I put the execute immediate and insert in the same
> block (which I hashed). But if I execute the execute immediate portion in
> another anyonymous block, it works fine (both the create and the insert).
> When I try to put them to gether like below, the insert tries to use
> xxdl_po_vendors_enc and says it cannot find the table. Is it because the
> pl/sql block does not know about the table at compile time? Is there
> any workaround for this ?

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Mar 02 2009 - 06:48:37 CST

Original text of this message