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: Create Table with DBMS_SQL problem

Re: Create Table with DBMS_SQL problem

From: Mark G <mgumbs_at_nospam.hotmail.com>
Date: Fri, 25 Jun 1999 09:15:55 +0100
Message-ID: <37733862.0@145.227.194.253>


I never tested this but in theory, you can create a synonym which maps to the temp table. write your code to look at this synonym so at compile time, although the synonym is invalid, the program *should* compile. At runtime, the temp table is created so there wouldn't be a problem.

Mark

Rob Bell wrote in message <3772F6DF.A6018989_at_csc.com>...
>Hello,
>
>I have a need to do a CREATE TABLE within a stored procedure in Oracle
>8. I did some research and found the DBMS_SQL package and have been
>able to put together the dynamic SQL for my table creation. Problem is,
>when I need to access the newly created temporary table from a query in
>another part of the stored procedure, it can't find the table. At
>compile time I get a message saying that the table name is not a
>declared object.
>
>It makes sense that at compile time there is no way to resolve the
>non-existant table. So, I'm guessing that I'm doing something wrong.
>How can I get the proc to compile and use my temp table? Is there
>another way to use temp tables from within a stored proc?
>
>Thanks in advance for any advice.
>
>Rob
>rbell1_at_nospam@netscape.net
Received on Fri Jun 25 1999 - 03:15:55 CDT

Original text of this message

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