By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,506 Members | 1,876 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,506 IT Pros & Developers. It's quick & easy.

Getting SQL0526N error when updating a Global Temporary table.

P: n/a
Hi y'all,

I am using a Created Global Temporary Table in DB2 OS/390 version
7.1.2. I am inserting some data in it and then updating the table using
ODBC but while I try to update it, I am getting following message.

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

Anyone has any ideas why I getting the above error message. Following
is the code snippet.

CDatabase* db;
....
db->BeginTrans()
....
CString sql_insert1 = "INSERT INTO PMD.G_FBLOT (ARRAY_ID, PROD_ID,
POOL_NUM, POOL_TYPE, SEC_ID, SEC_TYPE_ID, FACTOR, FACTOR_DATE, COUPON)
VALUES (99, 10099, 'VIK', 'SR', 111111, 3, 3.553, 012, 5.55);";

CString sql_insert2 = "INSERT INTO PMD.G_FBLOT (ARRAY_ID, PROD_ID,
POOL_NUM, POOL_TYPE, SEC_ID, SEC_TYPE_ID, FACTOR, FACTOR_DATE, COUPON)
VALUES (11, 10199,'SARAOG','ZZ', 55555,7, 5.55, 123, 6.66);";

CString sql_update = "UPDATE PMD.G_FBLOT SET PROD_ID = 777777 where
array_id = 11";

CString sql = sql_insert1 + sql_insert2 + sql_update;

db->ExecuteSQL(sql); // Get error here. If I just insert, the command
goes through

Thanks for your replies,
Vikas

Nov 12 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.