So I have a table named Table1. Inside Table1 are the fields: SKU, VendrItem, Qty and EachCost.
I want to combine the rows with the same SKU number.
I want less rows without changing anything other than the Qty field.
So instead of having multiple SKU rows with different quantities, it should have a single SKU row with the combined quantities.
So I want the table to eventually look like this:
I don't know how (or even if) I can do this. What code in SQL do I write to combine rows?
Code:
SKU VendrItem Qty EachCost 123 ABC 2 $2 123 ABC 5 $2 475 TGE 4 $9 887 ASW 8 $4 475 TGE 45 $9 788 WQQ 14 $1 475 TGE 20 $9 945 WWT 77 $3 788 WQQ 8 $1
I want less rows without changing anything other than the Qty field.
So instead of having multiple SKU rows with different quantities, it should have a single SKU row with the combined quantities.
So I want the table to eventually look like this:
Code:
SKU VendrItem Qty EachCost 123 ABC 7 $2 475 TGE 69 $9 887 ASW 8 $4 788 WQQ 22 $1 945 WWT 77 $3
Comment