If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Comparing rows from 2 tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-29-11, 05:53
Big_Moose Big_Moose is offline
Registered User
 
Join Date: Apr 2011
Posts: 1
Comparing rows from 2 tables

Hi,

I'm looking for a suitable DB2 query that will

a) Compare the column values of 2 similar length records from different tables (e.g. i have a new data feed (x) and need to check if there are any data updates when compared to the existing record (y)

b) After comparing, if there are any difference between the column values of 'x' and 'y', I should be able to update only the column values that have changed rather than the whole record 'y'

Any help here will be deeply appreciated. Thanks.

JV
Reply With Quote
  #2 (permalink)  
Old 04-29-11, 09:54
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Look at the MERGE statement in the manual.

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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