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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Must tables exist at PL/SQL compile time?

Re: Must tables exist at PL/SQL compile time?

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 01 Aug 2002 21:33:20 GMT
Message-ID: <3D49A91D.A309BFDA@exesolutions.com>


Thomas Gaines wrote:

> Good day -
>
> My PL/SQL skills are a tad rusty these days, and I so I have to
> ask this seemingly silly question.
>
> I'm attempting to compile a package, and the only error I receive speaks
> of a
> non-existent table (at compilation time, but not execution time)
> referenced
> in the code. My application flow will create the aforementioned
> table via a Pro*C program, and then the PL/SQL program will access
> it.
>
> Are you aware of any technique that I can use at PL/SQL compile time
> to avoid the dreaded "PLS-00201: identifier 'xxx.xxx' must be declared"
> error? I suppose that I could create a dummy xxx.xxx table, compile
> the PL/SQL and then remove the dummy table, but I'd rather avoid
> that if possible.
>
> Thanks very much,
> Tom

  1. The tables must exist at compile time.
  2. There is absolutely no excuse for creating tables on the fly in a procedure.
  3. You might choose to use a global temporary table but even that is likely to be unnecessary.

Tell us what you are actually trying to accomplish so we can help you with how to do it successfully from the standpoint of performance and scalability.

My instinct here is that you are trying to do TSQL in PL/SQL.

Daniel Morgan Received on Thu Aug 01 2002 - 16:33:20 CDT

Original text of this message

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