Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating a summation
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Generating a summation
Environment versions
Visual FoxPro:
VFP 6 SP5
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00989381
Message ID:
00989381
Views:
64
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()
Next
Reply
Map
View

Click here to load this message in the networking platform