[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Rép. : SQL in SQR



You can create several temp table by using several 'create table' orders
in a paragraph begin-select with ;; order separator like 'commit;;'.

Cordialement, Philippe.

>>> "Wagner, Jennifer A" <WAGNERJ@CDER.FDA.GOV> 05/04/01 15h55 >>>
I'm trying to create temp tables in my SQR program.  It will allow me to
create one, but I can't seem to get it to create more than one.  My ultimate
goal would be to have a a multi-module program where I select different
things from different tables and then insert them into the various temp
tables.

Do you know if you can create more than one temp table in a SQL paragraph in
SQR?

My temp table create statement looks like this:

begin-setup
page-size 56 132

BEGIN-SQL  ON-ERROR=SKIP

  CREATE TABLE PMCGEN_TEMP (GENERIC_NAME    VARCHAR2(40))
     TABLESPACE USER_ACCOUNTS
        STORAGE
        (INITIAL     5000K
         NEXT         500K);
end-sql
end-setup

and the insert statement looks like this:

begin-procedure INSERT_TEMP
BEGIN-SQL
INSERT INTO PMCGEN_TEMP (GENERIC_NAME)
values (&GEN);
END-SQL
COMMIT
end-procedure


That works fine.  But, I've tried to add another create table... and insert
into... and I get the message:  "table for view does not exist" for the
second table.


Thanks,


Jenny