Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query with a running total
Message
De
13/12/2006 11:27:26
 
 
À
19/07/2006 09:36:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01137566
Message ID:
01177215
Vues:
10
SELECT Date, Debit, Credit,;
       NVL(SELECT SUM(Credit-Debit) FROM MyTable Tbl1 WHERE Tbl1.Date < MyTable.Date), CAST(0 AS N(12,2)) AS Balance;
       FROM MyTable
Hi,

I refer to my earlier thread of wanting a running balance for debit and credit fields. I thank Borislav for the code he sent to me . However,the code works well if the running balance is for a particular date. But if there are many entries for a single date, all the running totals for a particular date period remain the same, even though the individual values of debit and credit are different. I would like to know how to get a running total based on the record number, and not the date.

Thanks,



Regards,

Steve.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform