I want to update a set of rows in a table with data from a different set of rows from the same table. Ex: I want to update Customer Invoice Amounts from year 2018 with Customer Invoice Amounts from Year 2017. In the below scenario I want to update Set2 with Amount and Product from Set1 for the respective Customer and Line Item.
Customer, Year, Invoice Line, Amount, Product Cus1, 2017, Line1, 200, PR1 Cus1, 2017, Line2, 300, PR2 Cus2, 2017, Line1, 500, PR2
Cus1, 2018, Line1, 0, Cus1, 2018, Line2, 0, Cus2, 2018, Line1, 0,
Can I accomplish this using MERGE command. I am not planning to insert data I just want to update the Set2 with any available data in Set1.