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 > view based on global temporary table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-21-08, 05:42
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
view based on global temporary table

Hi all,
i have next problem: i need make view based on declared global temporary table.
i can make procedure, open cursor, but i dont know how to return values using table function.
some ideas?
thanks.
version 8.2.3 LUW
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #2 (permalink)  
Old 01-21-08, 08:14
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
You cannot directly define a view of a global temp tables. I do not think you can declare a global temp table in a UDF either.

Andy
Reply With Quote
  #3 (permalink)  
Old 01-21-08, 09:21
jsharon1248 jsharon1248 is offline
Registered User
 
Join Date: Apr 2007
Location: Chicago
Posts: 57
Quote:
i need make view based on declared global temporary table
Why? Even if you could, I can't think of a reason that you'd want to.

Code:
The DECLARE GLOBAL TEMPORARY TABLE statement defines a 
temporary table for the current session. The declared temporary table 
description does not appear in the system catalog. It is not persistent and 
cannot be shared with other sessions. Each session that defines a declared 
global temporary table of the same name has its own unique description of 
the temporary table. When the session terminates, the rows of the table are 
deleted, and the description of the temporary table is dropped.
Reply With Quote
  #4 (permalink)  
Old 02-25-08, 13:04
baloo99 baloo99 is offline
Registered User
 
Join Date: Feb 2007
Location: Bratislava, Slovakia
Posts: 85
jsharon1248: i need obtain set of values from another system. all features, that you describe, makes from temporary table ideal candidate for restriction of result set. i have some existing application based on view. i cannot use temporary table with this view. in oracle this is possible.
__________________
Beer contains just a small amount of vitamines - that's why it's necessary to drink lot of it.
Reply With Quote
  #5 (permalink)  
Old 02-25-08, 13:16
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Quote:
Originally Posted by baloo99
jsharon1248: i need obtain set of values from another system. all features, that you describe, makes from temporary table ideal candidate for restriction of result set. i have some existing application based on view. i cannot use temporary table with this view. in oracle this is possible.
I do not understand what you want to do. Can you elaborate further?

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