Thank you for your help, I have solved that problem. When I declare a temporary table, there is not a ON COMMIT PRESERVE ROWS parameter in the SQL command, and the default parameter value is ON COMMIT DELETE ROWS.It means when the transaction is committed, all rows in the temporary table will be deleted. When I added this parameter to the command, it can save the data now.
The right SQL should be:
DECLARE GLOBAL TEMPORARY TABLE SESSION.TEST LIKE USER.USERDATA IN USERTEMP ON COMMIT PRESERVE ROWS NOT LOGGED
Thanks again!
Quote:
Originally posted by jsander
Hi,
can you record a transcript of your statements and DB2's messages and return codes? This will be of great help, because if it turns out to be a bug, you should be able to document this for IBM support.
And I would like to have a look at this, too.
Johann
|