Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running total query
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00083077
Message ID:
00083342
Views:
21
>I need to make a running total cursor that will be fed into a graph. For example, if I have this:
>
>
>datefield          numfield
>01/01/98        4
>01/08/98        10
>01/15/98        6
>
>
>...the output would be:
>
>datefield          runningsum
>01/01/98          4
>01/08/98          14
>01/15/98          20
>
>

SELECT t1.d, sum(t2.value) ;
FROM table t1 INNER JOIN table t2 ;
ON t2.d <= t1.d ;
GROUP BY t1.d

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform