473,545 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to update a Created Global Temporary table.

Hi everybody,

I asked the following question but didn't get any reply. If anyone
knows something about the problem, then please reply since I am really
in a bind. Here is the question...

I am using a Created Global Temporary Table in DB2 OS/390 version
7.1.2 with "ON COMMIT DELETE ROWS". The DBA says that I they don't have
the option of "ON COMMIT PRESERVE ROWS" for Created Global Temp.
tables. Anyway... 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 "

Following is the code snippet.
CDatabase* db;
....
db->BeginTrans()
....

CString sql_insert = "INSERT INTO TempTbl(ARRAY_I D, 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);";

db->ExecuteSQL(sql _insert); // Works fine

CString sql_update = "UPDATE TempTbl SET PROD_ID = 777777 where
array_id = 11";

db->ExecuteSQL(sql _update); // Gives error here
....

Thanks for your replies,
Vikas

Nov 12 '05 #1
3 3432
Hi,

Created tablespace is not a candidate for update command. For more
information see http://www.craigsmullins.com/dbu_0802.htm. why are you
moving for created temporary table? Hope you can use declared temporary
table instead(if possible).

Cheers,
Thiru.
WantedToBeDBA.

Nov 12 '05 #2
Thanks Thiru for the reply. I found the same thing from the DBA.
Unfortunately in our environment, we are not allowed to have declared
temporary table. Due to the restriction and this limitation on
temporary tables, we are getting data from some other place.

Regards, Vikas

Nov 12 '05 #3
If its a restriction, then nothing could be done..

Thiru.
WantedToBeDBA.

Nov 12 '05 #4

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

Similar topics

4
13680
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 object, and I am able to get the binary input stream from this blob. However, when I invoke InputStream.read(byte) on this input stream, I get the...
5
33611
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. Performance: 4 seconds, the system is doing a full-table scan of the second table, and the Explain Plan output
12
22911
by: jimserac | last post by:
I had previously posted this in an Access forum with negative results so will try here. Although this question specifies an Access database, I also wish to accomplish this with a large MS SQL Server database that we have. Question follows: The following SQL statement, used in VBScript,
10
10796
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 The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned:...
2
2451
by: Andy S. | last post by:
Hi, I'm trying to declare and use temporary tables. I have written the following code in Java. Creating the tablespace (i can see the tablespace created using the Control Center), the temporary table and even inserting the values execute fine (even the executeUpdate while inserting returns a positive number indicating that rows have been...
0
5803
by: M. David Johnson | last post by:
I cannot get my OleDbDataAdapter to update my database table from my local dataset table. The Knowledge Base doesn't seem to help - see item 10 below. I have a Microsoft Access 2000 database which indexes computer magazine articles for personal reference. I am developing a Visual Basic.NET program whose sole purpose is to enter new...
0
2662
by: sgueder | last post by:
Hi there, hope anybody can help me: I want to create a temporary table, want to fill that table with data and finally I want to use that table as my base-table for running some selects on it (DB2). So I used the following SQL: DECLARE GLOBAL TEMPORARY TABLE SESSION.SG_ADVICE (ID DECIMAL(11,0), ZAEHLER INTEGER) ON...
0
1275
by: p655279 | last post by:
I read my DB2 manual for positioned update (update .... current of) it says for positioned update: You cannot use an UPDATE statement to modify the rows of a created temporary table. However, you can use an UPDATE statement to modify the rows of a declared temporary table. so what does it mean? what is...
5
8802
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 INTEGER,
0
7468
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7401
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7808
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1884
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
704
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.