From: <>
Date: Tue, 22 Jul 2008 15:11:38 -0500
Message-ID: <>

Hi all:

My application team is doing the following. They have a table (col01, col02, col11, col12, col13) where col01 and col02 are primary key. They want to use the merge command to update/insert the data from a staging table which
has the same layout. One of the values in the col11/12/13 in the staging table is the new data, the other one or two are some default values. When they do merge command, these default data overwrite the data in the main table.
They are looking for a way to only modify the data in one of the columns (11/12/13) but not the others. If the staging table's col11 has the real data and col12 and col13 have default values, they only want to modify the col11 table in the main table. If the columns col11 and col13 in the stage table have the real data, they only want to modify
these columns in the main table without affecting the col12 etc. I don't think that one MERGE command will do that and that they would either need to provide all the correct data (no defaults) in the staging table or to create different versions of merge commands (updating different columns in the main table) and call them based on what data are written to the staging table.

Am I correct? Is there another (better) way to accomplish this?

thank you

Gene Gurevich

Received on Tue Jul 22 2008 - 15:11:38 CDT

Original text of this message