Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running total query
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00083077
Message ID:
00083342
Vues:
26
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform