BiggerBrother
Technical User
I have two tables. On is orders, and the other is despatches.
Orders:
Order ID
Product_ID
Quantity
Date
Despatches:
Despatch_ID
Order_ID
Product_ID
Despatch_Qty
I need to run a report which returns the order id of any orders where the items on the order have not all been despatched. So I may have an order with 10 widgets, and 5 were despatched in one load, and 3 in the next. So in the report, the order would be returned with the fact that two widgets are outstanding.
Is this possible in one sql statement, or do i need to test each order product one at a time?
Many thanks for any advice
BB
Orders:
Order ID
Product_ID
Quantity
Date
Despatches:
Despatch_ID
Order_ID
Product_ID
Despatch_Qty
I need to run a report which returns the order id of any orders where the items on the order have not all been despatched. So I may have an order with 10 widgets, and 5 were despatched in one load, and 3 in the next. So in the report, the order would be returned with the fact that two widgets are outstanding.
Is this possible in one sql statement, or do i need to test each order product one at a time?
Many thanks for any advice
BB