choose quantaty by lot using FIFO

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi.

I have aningredient that is sugar. So I need to conume sugar for my cakes. I
buy sugar in Fill so I need to know what quantaty I need to consume of each
fill.

Imagine that I have to consume 3kg of sugar. In fill 1 I still have 2kg and
in fill 2 i have 5 kg. Fill 1 arrive first then fill 2.

How can I create a query that tells me that I should use the 2kg of fill 1
and 1 kg of fill 2?


At the moment I have a query with the total quantaty of ingredients that I
need to use and ontherwith the fill that show me how much quantaty that I
have in each fill.


Regards,
Marco
 
I have aningredient that is sugar. So I need to conume sugar for my cakes. I
buy sugar in Fill so I need to know what quantaty I need to consume of each
fill.

Imagine that I have to consume 3kg of sugar. In fill 1 I still have 2kg and
in fill 2 i have 5 kg. Fill 1 arrive first then fill 2.

How can I create a query that tells me that I should use the 2kg of fill 1
and 1 kg of fill 2?

See:

FIFO and LIFO
by Joe Celko
http://www.dbazine.com/ofinterest/oi-articles/celko32

Jamie.

--
 
Back
Top