dbaspot
Tags Register FAQ Calendar Search Today's Posts Mark Forums Read

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 ...


Home > Database Forum > Other Databases > ibm-db2 > Help with OLAP query

Reply

 

LinkBack Thread Tools Display Modes
  #1  
Old 09-10-2009, 05:28 AM
usenet
Guest
 
Posts: n/a
Default Help with OLAP query

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.
Reply With Quote
  #2  
Old 09-10-2009, 06:47 AM
usenet
Guest
 
Posts: n/a
Default Re: Help with OLAP query

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

Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 10:11 AM.