>Donald Duck wrote :

>Last but not least I have another question about dbproc's.
>I tried to work with a temporary table, created with
>create table temp.xyz (... but when I try to access it from a dbproc with
>select * from "TEMP".test i get the errmsg "Unknown table name".
>The same error occurs when i try it without the quotation marks.
>For this reason i used regular tables to store the information temporary.

If you try to access a temporary table from a db-procedure, the table must be created 
inside the procedure. This is because db-procedures are compiled, and its not sure
that the temporary table will exist at execution time.
But there's a dirty way to mislead the compiler. Just create the temporary table inside
the db-procedure in code that will never be executed :

CREATE DBPROC ....

IF FALSE
THEN
    CREATE TABLE TEMP.XYZ (...); 
 
select * from "TEMP".XYZ;

In this case the existing temporary table created outside of the db-procedure will be
used at execution time.

Thomas

-- 
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general


_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to