Re: FIFO Help
- From: "mattc66 via AccessMonster.com" <u16013@uwe>
- Date: Fri, 05 Sep 2008 05:06:08 GMT
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
.
- Follow-Ups:
- Re: FIFO Help
- From: Graham Mandeno
- Re: FIFO Help
- From: Piet Linden
- Re: FIFO Help
- References:
- FIFO Help
- From: mattc66 via AccessMonster.com
- Re: FIFO Help
- From: Graham Mandeno
- FIFO Help
- Prev by Date: Re: insurance agency mangement system
- Next by Date: no relations when importing xsd schema file
- Previous by thread: Re: FIFO Help
- Next by thread: Re: FIFO Help
- Index(es):