Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Location
    São Paulo, Brazil
    Posts
    32

    Exclamation Unanswered: 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 14:56.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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.

  4. #4
    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.

Posting Permissions

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