Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old June 27th, 2008, 06:39 PM
Mohammad
Guest
 
Posts: n/a
Default Update Problem

Hi

I have this query to update some records in my table. It is working
good but my problem is this query very slow. Is any way to do this job
faster.

UPDATE SWKPIFA Y
SET Y.SWKPIFA_TRAN_CODE = 'G'
WHERE SWKPIFA_START_TERM =
( SELECT MIN(X.SWKPIFA_START_TERM)
FROM SWKPIFA X
WHERE Y.SWKPIFA_PIDM = x.SWKPIFA_PIDM
AND Y.SWKPIFA_MAJR_CODE = X.SWKPIFA_MAJR_CODE)
AND SWKPIFA_END_TERM =
( SELECT MAX(X.SWKPIFA_END_TERM)
FROM SWKPIFA X
WHERE Y.SWKPIFA_PIDM = x.SWKPIFA_PIDM
AND Y.SWKPIFA_MAJR_CODE = X.SWKPIFA_MAJR_CODE)
/

Thanks
Hakim
 

Bookmarks

Thread Tools

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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles