Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating in a scan...endscan
Message
De
02/10/2006 09:27:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01158457
Message ID:
01158533
Vues:
23
Hi

May I suggest the code given to me by Borrislav Borrisov to encounter a similar problem of a runnig total required on a cursor having date,debit,credit, and running total as the final fields:

The code is as follows:
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
I hope this helps.

Regards,

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

Click here to load this message in the networking platform