The title is very descriptive i think... My scenario is the next. I need to put the result of a result set (for example a result set with 6 columns and variable rows) from a stored procedure in some temporary table to make some operations over this new table. I find some examples in the web but nothing in DB2... The big problem is how to populate that new table with the restult set of a called stored procedure
Asked
Active
Viewed 1,417 times
1
-
What version of DB2 are you running, and on what operating system? – Ian Bjorhovde Mar 03 '11 at 22:01
1 Answers
0
DECLARE GLOBAL TEMPORARY TABLE probably accomplishes what you want. You can create this type of temporary table inside a stored procedure. It is visible only to the current session and is cleaned up for you when the session ends.

Kevin Beck
- 2,394
- 2
- 15
- 27
-
2Yeah... I know how can create the table... The big problem is how to populate that new table with the restult set of a called stored procedure... If you can answer that you can be my hero! ... Thanks in advice – Nicolas Mar 06 '11 at 14:53