Running Total

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

Guest

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
 
I suppose that your query needs to perform the sum by the TransID. Post
your SQL and let's see what's doin.
 
Actually needs to sum for each RecID (Sku)
i.e.
as of 9/18/04

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

thanks
 
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
 
Back
Top