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 > Problem with a global temporary table in a function

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-25-04, 13:46
Alairj Alairj is offline
Registered User
 
Join Date: Nov 2004
Location: São Paulo, Brazil
Posts: 32
Exclamation Problem with a global temporary table in a function... URGENT

Hi,

I am starting in DB2 and i want to make a select in a global temporary table, in a procedure it works normally, but in a function it isn't, a had tried a lot's of things but all of then got an error like this:

SQL0526N The requested function does not apply to declared temporary tables.

Someone knows the reasons of this error?

Thanks.

Last edited by Alairj; 11-25-04 at 13:56.
Reply With Quote
  #2 (permalink)  
Old 11-25-04, 14:00
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
A global temporary table is not supported in a function.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 11-25-04, 14:21
Alairj Alairj is offline
Registered User
 
Join Date: Nov 2004
Location: São Paulo, Brazil
Posts: 32
Ok, thanks...

But you know a different way to do the same thing that the global temporary table do ? For example i need to keep a several records in the user session, but i can't find.

Thanks a lot.
Reply With Quote
  #4 (permalink)  
Old 12-01-04, 10:36
Alairj Alairj is offline
Registered User
 
Join Date: Nov 2004
Location: São Paulo, Brazil
Posts: 32
I solve my problem making a procedure that reads a global temporary table and a function that executes this procedure and gets his result.
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