Query for Running Inventory Balance

L

LuvToGlass

Greetings,
I have a lot to learn about queries and hope that the experts can help
me. I need a column providing a running balance taking in account the
following criteria: INV (on hand) - O_QTY (Order Qty) + S_QTY (Supply
Qty) for each SKU#. Something like:

Balance
-7
25
10
2
-6
0
-23
1
-7
2
-13
2
-6
0

Sample Data:
SKU# C_ORDER# D_DATE O_QTY INV S_QTY S_DATE S_ORD#
9936618 CD-80411211/ 1 08/22/2007 -7 0
9936618
32 08/24/2007 W-37372/ 4/
9936618 CD-80411211/ 1/2 08/29/2007 -15
9936618 CD-80411211/ 1/3 09/05/2007 -8
9936618 CD-80411211/ 1/4 09/24/2007 -8
9936618
6 09/24/2007 PL-9936618/ 1
9936618 CD-80411211/ 1/5 10/01/2007 -23
9936618
24 10/01/2007 PL-9936618/ 2
9936618 CD-80411211/ 1/6 10/15/2007 -8
9936618
9 10/15/2007 PL-9936618/ 3
9936618 CD-80411211/ 1/7 10/22/2007 -15
9936618
15 10/22/2007 PL-9936618/ 4
9936618 CD-80411211/ 1/8 10/29/2007 -8
9936618
6 10/29/2007 PL-9936618/ 5

Thank you
 
L

LuvToGlass

Sample Data:
SKU# C_ORDER# D_DATE O_QTY INV S_QTY
S_DATE S_ORD#
9936618 CD-80411211/1 08/22/2007 -7 0
9936618
32 08/24/2007 W-37372/ 4
9936618 CD-80411211/2 08/29/2007 -15
9936618 CD-80411211/3 09/05/2007 -8
9936618 CD-80411211/4 09/24/2007 -8
9936618
6 09/24/2007 PL-9936618/ 1
9936618 CD-80411211/5 10/01/2007 -23
9936618
24 10/01/2007 PL-9936618/ 2
9936618 CD-80411211/6 10/15/2007 -8
9936618
9 10/15/2007 PL-9936618/ 3
9936618 CD-80411211/7 10/22/2007 -15
9936618
15 10/22/2007 PL-9936618/ 4
9936618 CD-80411211/8 10/29/2007 -8
9936618
6 10/29/2007 PL-9936618/ 5
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top