B
basic
What I am trying to do is take the following data and create totals for
similar line items.
If the BOL and the Part are the same then the two line items should be
combined.
The Quantity and the Amount should be totalled, everything else should
remain the same.
If you notice from the example the line items went from 7 to 5.
Example:
Cust. ShipDate BOL Part Quantity Price Amount
ABC 05/02/08 9490 A 1 2.00 2.00
ABC 05/02/08 9490 A 1 2.00 2.00
ABC 05/02/08 9490 B 2 1.00 2.00
ABC 05/05/08 9491 A 1 2.00 2.00
ABC 05/05/08 9491 A 1 2.00 2.00
ABC 05/05/08 9491 B 2 1.00 2.00
ABC 05/05/08 9491 C 3 3.00 9.00
Answer:
Cust. ShipDate BOL Part Quantity Price Amount
ABC 05/02/08 9490 A 2 2.00 4.00
ABC 05/02/08 9490 B 2 1.00 2.00
ABC 05/05/08 9491 A 2 2.00 4.00
ABC 05/05/08 9491 B 2 1.00 2.00
ABC 05/05/08 9491 C 3 3.00 9.00
similar line items.
If the BOL and the Part are the same then the two line items should be
combined.
The Quantity and the Amount should be totalled, everything else should
remain the same.
If you notice from the example the line items went from 7 to 5.
Example:
Cust. ShipDate BOL Part Quantity Price Amount
ABC 05/02/08 9490 A 1 2.00 2.00
ABC 05/02/08 9490 A 1 2.00 2.00
ABC 05/02/08 9490 B 2 1.00 2.00
ABC 05/05/08 9491 A 1 2.00 2.00
ABC 05/05/08 9491 A 1 2.00 2.00
ABC 05/05/08 9491 B 2 1.00 2.00
ABC 05/05/08 9491 C 3 3.00 9.00
Answer:
Cust. ShipDate BOL Part Quantity Price Amount
ABC 05/02/08 9490 A 2 2.00 4.00
ABC 05/02/08 9490 B 2 1.00 2.00
ABC 05/05/08 9491 A 2 2.00 4.00
ABC 05/05/08 9491 B 2 1.00 2.00
ABC 05/05/08 9491 C 3 3.00 9.00