Hello,
I have attached sample files of my orders table, order line items table and the result that I am looking for.
We get orders with a unique order number. The orders table has the high level particulars - like order number, time placed, customer id, customer name etc. etc., Order total amount and so on.
There is an order line items table that gives the details for each order - like products purchased, qty, line item total. This table also contains two additional items - SHIPPING and DISCOUNT.
I would like to extract the SHIPPING amount for each order (if it exists) or make Charge for SHIPPING = 0, and put it in the RESULTS TABLE. The Same goes for DISCOUNT.
SO the RESULTS TABLE is the ORDERS TABLE with two extra columns, SHIPPING and DISCOUNT.
I dont know how to loop through using index and match to cycle through all the line items for each order (and the number will be different for different orders) to find the SHIPPING cost or the DISCOUNT if it exists.
Thanks for any guidance in advance.
Sam
I have attached sample files of my orders table, order line items table and the result that I am looking for.
We get orders with a unique order number. The orders table has the high level particulars - like order number, time placed, customer id, customer name etc. etc., Order total amount and so on.
There is an order line items table that gives the details for each order - like products purchased, qty, line item total. This table also contains two additional items - SHIPPING and DISCOUNT.
I would like to extract the SHIPPING amount for each order (if it exists) or make Charge for SHIPPING = 0, and put it in the RESULTS TABLE. The Same goes for DISCOUNT.
SO the RESULTS TABLE is the ORDERS TABLE with two extra columns, SHIPPING and DISCOUNT.
I dont know how to loop through using index and match to cycle through all the line items for each order (and the number will be different for different orders) to find the SHIPPING cost or the DISCOUNT if it exists.
Thanks for any guidance in advance.
Sam