473,387 Members | 1,441 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.

question on update sql

I have a sql in a siebel environment that is running for a long time.
Is there any way I can tune this sql :

UPDATE siebel.S_ORG_EXT BT
SET PR_POSTN_ID = (SELECT MIN(T_ACCNTPOST_POSITI) C1
FROM siebel.EIM_ACCNT_CUT
WHERE( T_ACCNTPOST_OUEXTI = BT.ROW_ID
AND ACC_PR_POSTN = 'N'
AND T_ACCNTPOST_OUEXTI IS NOT NULL
AND IF_ROW_BATCH_NUM = 5454
AND T_ACCNTPOST__STA = 3
AND T_ACCNTPOST__RID IS NOT NULL)), LAST_UPD = ?
WHERE (ROW_ID IN ( SELECT T_ACCNTPOST_OUEXTI C1
FROM siebel.EIM_ACCNT_CUT
WHERE( ACC_PR_POSTN = 'N'
AND T_ACCNTPOST_OUEXTI IS NOT NULL
AND IF_ROW_BATCH_NUM = 5454
AND T_ACCNTPOST__STA = 3
AND T_ACCNTPOST__RID IS NOT NULL)))
TIA

Dec 11 '06 #1
1 1421
MERGE INTO siebel.S_ORG_EXT BT
USING (SELECT MIN(T_ACCNTPOST_POSITI) C1
FROM siebel.EIM_ACCNT_CUT
WHERE ACC_PR_POSTN = 'N'
AND T_ACCNTPOST_OUEXTI IS NOT NULL
AND IF_ROW_BATCH_NUM = 5454
AND T_ACCNTPOST__STA = 3
AND T_ACCNTPOST__RID IS NOT NULL
GROUP BY OST_OUEXTI) AS S
ON T_ACCNTPOST_OUEXTI = BT.ROW_ID
WHEN MATCHED THEN UPDATE SET PR_POSTN_ID = c1,
LAST_UPD = ?

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

WAIUG Conference
http://www.iiug.org/waiug/present/Fo...Forum2006.html
Dec 11 '06 #2

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

Similar topics

5
by: jayson_13 | last post by:
Hi, I need to implement a counter and i face problem of locking so hope that u guys can help me. I try to do test like this : 1st connection SELECT * FROM nextkey WHERE tblname = 'PLCN'...
0
by: chan | last post by:
how to apply online update function into program (the effect just like Norton system work live update) The situation is below: I want to develop a program that contains some product...
3
by: Eric A. Johnson | last post by:
I'm using ADO style. I have an Access database with four tables that I will want to do queries on. I will want to do queries on all four tables, at least individually, and possibly at the same...
7
by: chessplayer | last post by:
Greetings Folks, I am trying to understand how DB2 locks data and can't believe my eyes. Have read the literature about the difference isolation levels and have a general understanding about...
3
by: windandwaves | last post by:
Hi Gurus Does anyone know how I set the error trapping to option 2 in visual basic. I know that you can go to tools, options and then choose on unhandled errors only, but is there a VB command...
9
by: Michael | last post by:
Hi all, I would like to get people's opinion about executing SQL statements in C# (or any other .NET language really). I used to create my SQL statement by building a string and replacing single...
0
by: Ed West | last post by:
Hello, I am wondering about best practices for class hierarchies and using ADO.Net, especially the DataSet update/delete commands and the data relations... this needs to package/unpackage to xml...
1
by: Natalia DeBow | last post by:
Hi, I am working on a Windows-based client-server application. I am involved in the development of the remote client modules. I am using asynchronous delegates to obtain information from...
10
by: =?ISO-8859-1?B?UOlw6g==?= | last post by:
Hi all. Im a newbie in PHP and im trying to upload a file to the server. I use a form to upload a pdf file and some text information about it. The client uploads the file and the system...
8
by: puzzlecracker | last post by:
Say you have a class: stuct Updater{ int _v1; int _v2 int _v3; update(int v1, int v2, int v2); bool isBad(int val); };
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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: 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
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,...
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.