May 13, 2005 #1 PortyAL Technical User May 13, 2005 126 GB Hi Is there any way of showing a running total in a query? e.g. Month Cost Total to date April £1000 £1000 May £1500 £2500 June £950 £3450 etc. Thanks Alan Cassells
Hi Is there any way of showing a running total in a query? e.g. Month Cost Total to date April £1000 £1000 May £1500 £2500 June £950 £3450 etc. Thanks Alan Cassells
May 13, 2005 #2 PHV MIS Nov 8, 2002 53,708 FR SELECT A.Month, A.Cost, Sum(B.Cost) AS [Total to date] FROM yourTable A INNER JOIN yourTable B ON A.Month >= B.Month; Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
SELECT A.Month, A.Cost, Sum(B.Cost) AS [Total to date] FROM yourTable A INNER JOIN yourTable B ON A.Month >= B.Month; Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886