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 Tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-04-04, 11:30
trini0 trini0 is offline
Registered User
 
Join Date: Aug 2003
Posts: 24
Question Temporary Tables

Using db2 8.1.3 Personal Edition on w2k.
Im trying to figure out how to create temporary tables.
In my current context, Im altering tables, and the ALTER TABLE sql statement, doesnt do what I want it to do...

First I just want to verify that temporary tables cannot contain CLOB fields?
I got this from the Information Center ->
"Note that BLOB, CLOB, DBCLOB, LONG VARCHAR, LONG VARGRAPHIC, DATALINK, reference, and structured types cannot be used with declared global temporary tables (SQLSTATE 42962)."
I need to know if this is really true, as that may hamper me down the road....

Current problem.
I have a table with this structure ->
CREATE TABLE "NULLID "."BLOCKS" (

"BID" VARCHAR(16) NOT NULL WITH DEFAULT '0' ,

"SIDE" SMALLINT NOT NULL WITH DEFAULT 0 ,

"GROUPS" VARCHAR(50) NOT NULL WITH DEFAULT '' ,

"BLOCK_FILE" VARCHAR(50) NOT NULL WITH DEFAULT '' ,

"TITLE" VARCHAR(50) NOT NULL WITH DEFAULT '' ,

"CONTENT" VARCHAR(25) NOT NULL WITH DEFAULT '' )

IN "USERSPACE1" ;

When trying to create a temporary table, Im getting ->
db2 => declare global temporary table foo like nullid.blocks
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0286N A default table space could not be found with a page size of at
least "4096" that authorization ID "ADMINISTRATOR" is authorized to use.
SQLSTATE=42727

Could anyone point out where Im going wrong with this?
Thanks
Reply With Quote
  #2 (permalink)  
Old 07-05-04, 04:34
geoffrey geoffrey is offline
Registered User
 
Join Date: Jun 2004
Posts: 39
You have to create a temporary tablespace (with an user with admin rigth) then granting access to this tablespace for your user. After that, you will be able to create your temporary table.
__________________
geoffrey
- Four J's Development Tools -
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