Help with OLAP query - ibm-db2
This is a discussion on Help with OLAP query - ibm-db2 ; I am trying to work out an olap query to allocate parts in stock to customer orders. Imagine to have a purchase order table like this: OrderID, PartNumber, QtyOrdered and a stock table like this LotID, PartNumber, QuantityOnHand ( a ...
![]() |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| |||
| |||
| customer orders. Imagine to have a purchase order table like this: OrderID, PartNumber, QtyOrdered and a stock table like this LotID, PartNumber, QuantityOnHand ( a part number can be present in stock with different LotId, customer does no care to receive different lots for a given part number on order) I need to work out a query that allocate each LotID to customers orders: OrderID, PartNumber, QtyOrdered, LotID, QuantityAllocated obviously the total quantity allocated must not exceed QuantityOnHand. Any help really appreciated. |
|
#2
| |||
| |||
|
On Sep 10, 11:28*am, Massimiliano Campagnoli wrote: > I am trying to work out an olap query to allocate parts in stock to > customer orders. > > Imagine to have a purchase order table like this: > > OrderID, PartNumber, QtyOrdered > > and a stock table like this > > LotID, PartNumber, QuantityOnHand > > ( a part number can be present in stock with different LotId, customer > does no care to receive different lots for a given part number on > order) > > I need to work out a query that allocate each LotID to customers > orders: > > OrderID, PartNumber, QtyOrdered, LotID, QuantityAllocated > > obviously the total quantity allocated must not exceed QuantityOnHand. > > Any help really appreciated. I'm not sure I understand the question. What have you tried, and what is wrong with it? /Lennart |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
All times are GMT -4. The time now is 10:11 AM.



Linear Mode