Running Total

D

Dodd

I have a table that requires me to actually store a calculated value for a
running total for inventory purposes

TransID = PK
RecID = the Sku
OrderDate
Shipped = units shipped
ShippedToDate = Value i need to calculate

have tried this multiple ways and i either seem to get a total for every
RecID to the OrderDate or for the correct RecID for its entire history even
beyond the OrderDate

thanks
 
M

[MVP] S.Clark

I suppose that your query needs to perform the sum by the TransID. Post
your SQL and let's see what's doin.
 
D

Dodd

Actually needs to sum for each RecID (Sku)
i.e.
as of 9/18/04

RecID = 3 ShippedToDate=27
RecID = 4 ShippedToDate=0

thanks
 
D

Dodd

This performs as it should - calculating shipped to date from an enter value
[DateofShipment]

SELECT tblWorking_Ship_LCCT.RecID, Sum(tblWorking_Ship_LCCT.[Manifested
Qty]) AS [SumOfManifested Qty]
FROM tblWorking_Ship_LCCT
WHERE (((tblWorking_Ship_LCCT.[O/B Departure Date Time])<=[DateOfShipment]))
GROUP BY tblWorking_Ship_LCCT.RecID
ORDER BY tblWorking_Ship_LCCT.RecID;

but i would need to have it run through a table views the dates of shipments
per RecID and calculate the balance on each day

thanks for the help
 

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