I have to create an order booking report. It has to be recreated from Invoice history. The issue I am having trouble with is that an Item on an ORDER can be shipped more than once (partial shipment). Yet I only want to count the first occurrence of the of the order in the Invoice history files.
Attached are two files.
1. The excel sheets graphically shows what the original orders were and how they actually appear in the Invoice history file.
2. A text file containing a table CREATE statement and SELECT statement to populate the new table.
I need to query this table to return the orders as they were originally entered.
Ultimately I am going to return by period, by itemno, by Customer the quantities ordered. But if you can help me get started by just recreating the orders from the invoice history, I will try to do the rest.