Merge Statement

From: John Schaeffer <amerar_at_iwc.net>
Date: Thu, 19 Mar 2009 09:05:57 -0700 (PDT)
Message-ID: <fd95a6af-0a33-4774-a1bb-8f1d69c6e951_at_j8g2000yql.googlegroups.com>


Merge statement is useful, but can it do anything in this situation:

I have the following:

Product Table: PRODUCT_CODE, PRODUCT_DESCRIPTION. Lookup Table: PRODUCT_ID, PRODUCT_CODE
Updates: PRODUCT_ID, NEW_DESCRIPTION

I need to update or insert the Product Table. But, in order to use the updates coming in, I need the Lookup Table to translate the ID into the Code.

I know there are hundreds of ways to do this, but can MERGE do this? Received on Thu Mar 19 2009 - 11:05:57 CDT

Original text of this message