If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Temporary tablespace

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-19-04, 10:10
deepakatfre deepakatfre is offline
Registered User
 
Join Date: Jun 2004
Posts: 32
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
Reply With Quote
  #2 (permalink)  
Old 08-19-04, 11:26
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
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
Reply With Quote
  #3 (permalink)  
Old 08-19-04, 13:13
deepakatfre deepakatfre is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 08-19-04, 13:21
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You need to use a Cursor to select data in a stored procedure.

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On