magritton
3/24/2015 - 7:35 PM

Merging one table with another when a certain criteria is meet.

Merging one table with another when a certain criteria is meet.

MERGE INTO MTL_MATERIAL_TRANSACTIONS mmt
USING MTL_MATERIAL_TRANSACTIONS_SSIS_test mmtt
ON mmt.TRANSACTION_ID = mmtt.TRANSACTION_ID
WHEN MATCHED THEN
UPDATE
SET mmt.ACTUAL_COST = mmtt.ACTUAL_COST,
mmt.PRIOR_COST = mmtt.PRIOR_COST,
mmt.NEW_COST = mmtt.NEW_COST;