Unix Technical Forum

Getting SQL0526N error when updating a Global Temporary table.

This is a discussion on Getting SQL0526N error when updating a Global Temporary table. within the DB2 forums, part of the Database Server Software category; --> Hi y'all, I am using a Created Global Temporary Table in DB2 OS/390 version 7.1.2. I am inserting some ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 03:07 AM
vsaraog@gmail.com
 
Posts: n/a
Default Getting SQL0526N error when updating a Global Temporary table.

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:51 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com