473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Nov 12 '05 #1
0 1527

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jim Garrison | last post by:
Scenario: 1) Create a GLOBAL TEMPORARY table and populate it with one (1) row. 2) Join that table to another with about 1 million rows. The join condition selects a few hundred rows. ...
10
by: Ranga | last post by:
I was unable to run the statement "CREATE GLOBAL TEMPORARY TABLE" on unix version of DB2, it gave the follwing error db2 => create global temporary table temp ( OGI_SYS_NR char(8) ) DB21034E ...
6
by: Joachim | last post by:
I made some project changes (which seems it doesn't help if I undo) which have created compilation error: " Server Error in '/PCSWebApp1' Application....
1
by: abh1508 | last post by:
Following a release of code the following problem occurs on certain asp ..net pages. This is not a problem on other testing/demo environments. IIS seems to be creating certain files twice in the...
1
by: David Lozzi | last post by:
Hello, Writing a web app in asp.net using vb. Just created a new page, added a few minor controls and now blamo, the below error: HELP Server Error in '/newsite' Application....
1
by: vijaykumars | last post by:
+-----------------------------------------------------------------------------+ Summaries: +-----------------------------------------------------------------------------+ Installation...
0
by: JimN1 | last post by:
Error: Update requires a valid UpdateCommand when passed DataRow collection with modified rows. This is a continuation of my previous table element update question. I am now getting the above...
5
by: Rahul B | last post by:
Hi, I have very little knowledge about creating Procedures/functions in DB2. When i tried to create the test function like CREATE FUNCTION GET_TEST (P_TEST_ID INTEGER, P_SEL_OR_SORT...
4
by: Corrine | last post by:
Hi, I am creating a global temporary table that is session-specific. I insert a BLOB into this table, and then select the BLOB from this table into a ResultSet. The ResultSet sees this BLOB...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.