Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    32

    Unanswered: Temporary tablespace

    Hi
    UDB version 8.01.0005
    I have a temporary table space,

    My question is
    How many temporary tables can I create in this tablepace ?

    Thanks

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    The way I read the manual:

    SMS: 65,534
    DMS: 51,000 table objects (data, indexes, long varchar, vargraphic, and LOB columns). Table objects in the same tablespace as the base table do not count toward this limit.

    HTH

    Andy

  3. #3
    Join Date
    Jun 2004
    Posts
    32

    Temporary tables

    Hi
    This is on UDB 8.01.005
    I have created a procedure with two temporary tables,
    But I am not able to have a select statment to read the data from these
    temprorary tables in a procedure (The last sql select statement is not going fine)

    CREATE PROCEDURE udbadm.test_multipletl
    DYNAMIC RESULT SETS 1
    LANGUAGE SQL
    BEGIN
    DECLARE CONTINUE HANDLER FOR SQLEXCEPTION,SQLWARNING,NOT FOUND
    DECLARE GLOBAL TEMPORARY TABLE SESSION.temp_1
    like schema.table1 including column defaults
    with replace
    on commit preserve rows
    NOT LOGGED IN TMPDBTS1;

    DECLARE GLOBAL TEMPORARY TABLE SESSION.temp_2
    like schema.table2 including column defaults
    with replace
    on commit preserve rows
    NOT LOGGED IN TMPDBTS1;

    insert into session.temp_1
    select *
    from schema.table1;


    insert into session.temp_2
    select *
    from schema.table2;

    select *
    from
    session.temp_2;
    END

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You need to use a Cursor to select data in a stored procedure.

    Andy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •