Re: FIFO Help



Okay - I am running into a little trouble. If I have 3 orders each one has
order qty as an example

Order 1 item1 qty 2
Order 2 item1 qty 1
Order 3 item1 qty 3

Inventory stock of item1 = 5 the query will report that it can ship all these
orders. However it can only ship 2 of the 3 orders. Any ideas how I can over
come this issue?

Graham Mandeno wrote:
Hi Matt

I would create a query from OrderDetail and Inventory showing which
OrderDetail records have insufficient stock:

qryInsufficientStock
===============
Select OrderDetail.OrderID, OrderDetail.ProductID
from OrderDetails inner join Inventory
on OrderDetails.ProductID=Inventory.ProductID
where (Inventory.Qty<OrderDetail.Qty);

Then use the existence of a record in this query to eliminate orders that
are able to be processed:

Select * from Orders where not exists (Select OrderID from
qryInsufficientStock as X where X.OrderID = Orders.OrderID)
order by OrderDate;
Hi All,

[quoted text clipped - 33 lines]

Stock

--
Matt Campbell
mattc (at) saunatec [dot] com

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-tablesdbdesign/200809/1

.