Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Create Table with DBMS_SQL problem
HI,
My first guess would be that there is
a problem recognizing the owner.
So, when creating it, you could give
it the schema/owner too, ie:
create table
myschema.mytable ....
then, when retrieving from it, use:
from myschema.mytable
Also, you could create a synonym for
the table, and grant select to public.
Rodger
In article <3772F6DF.A6018989_at_csc.com>,
Rob Bell <rbell1_at_csc.com> wrote:
> 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
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri Jun 25 1999 - 13:57:35 CDT