How should you use a MERGE T-SQL statement to accomplish this goal?

You are creating a sales data warehouse. When a product exists in the product dimension, you update the
product name. When a product does not exist, you insert a new record. In the current implementation, the
DimProduct table must be scanned twice, once for the insert and again for the update. As a result, inserts and
updates to the DimProduct table take longer than expected. You need to create a solution that uses a single
command to perform an update and an insert. How should you use a MERGE T-SQL statement to accomplish
this goal? (To answer, drag the appropriate answer choice from the list of options to the correct location or
locations in the answer area. You may need to drag the split bar between panes or scroll to view content.)

You are creating a sales data warehouse. When a product exists in the product dimension, you update the
product name. When a product does not exist, you insert a new record. In the current implementation, the
DimProduct table must be scanned twice, once for the insert and again for the update. As a result, inserts and
updates to the DimProduct table take longer than expected. You need to create a solution that uses a single
command to perform an update and an insert. How should you use a MERGE T-SQL statement to accomplish
this goal? (To answer, drag the appropriate answer choice from the list of options to the correct location or
locations in the answer area. You may need to drag the split bar between panes or scroll to view content.)

Answer:

Explanation:

References:
http://msdn.microsoft.com/en-us/library/bb510625.aspx
http://msdn.microsoft.com/en-us/library/cc280522.aspx



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Howie

Howie

Target
Source
Matched then
Not matched by target then

Henry Figgins

Henry Figgins

461 question