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