Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generating a summation
Message
De
22/02/2005 16:34:31
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Divers
Thread ID:
00989381
Message ID:
00989433
Vues:
31
>I need to be able to get summations for various tables where the structures are not known at coding time. Does anyone have something better than this?
>
>local nStop,i,cBuff
>use ?
>nStop=afields(aList)
>cBuff="select cAcctNo "
>for i = 1 to nStop
>	if aList[i,2]="N"
>		cBuff = cBuff+",sum("+aList[i,1]+")"
>	endif
>next
>cBuff=cBuff+" from "+dbf()
>
TOTAL TO SYS(2023)+'\TOTALS' ON .t.
SELECT 0
USE SYS(2023)+'\TOTALS'
BROWSE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform