Re: using execute immediate for create table and then insert

  • From: Gints Plivna <gints.plivna@xxxxxxxxx>
  • To: ksmadduri@xxxxxxxxx
  • Date: Mon, 2 Mar 2009 14:48:37 +0200

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@xxxxxxxxx>:
> 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 ?
--
//www.freelists.org/webpage/oracle-l


Other related posts: