>Hi.
>
>Anybody know of a way, in one pass, to accumulate a field with SQL code. I would like to do something like:
>Select Myfield,Cum(Myfield) as MyCum from myfile into cursor Mycursor
>To give following result:
>
>Myfield Mycum
>1 1
>3 4
>2 6
>8 14
>6 20 etc...
>
>regards,
>Gerard
Try doing your select with the COUNT() function to get the numbers of rows, or the SUM() function to get the total amounts of the data in the fields...
SELECT SUM(myfield), myfield GROUP BY myfield
HTH
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown