Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sum up a set of field
Message
 
À
19/10/2010 11:17:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01486130
Message ID:
01486144
Vues:
58
>I need to sum a set of fields by an other field in a table and i'd like to know if my idea is good enough.
>(It seemed to be a bit clumsy).
>The table is like this
>A       B 	C
>aa      1	1
>bb      2	
>bb      3	
>bb      4	9
>cc      5	5
>dd      6	
>dd      7	
>dd      8	21
>So I should sum field "B" by field "A" in the filed "C". I would use 2 do while loops, one of them goes through the table and the other one would sum up the filed B if there are more than two identical ones in field "A". Does it seem ok?

What you want as a result from this example data?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform