[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
+---------------------------------+
| SUM |
+---------------------------------+
SUM [<expr list>]
[<scope>] [FOR <expL1>]
[WHILE <expL2>]
[TO <memvar list>
| TO ARRAY <array>]
[NOOPTIMIZE]
-----------------------------------
Calculates sum of numeric fields.
-----------------------------------
<expr list>
One or more fields or field expressions to be summed. If an expression
list is not specified, all numeric fields are summed.
<scope>
Only the records that fall within range of records specified by scope
are included in total.
FOR <expL1>
Only records that satisfy logical condition <expL1> are included in the
total.
Rushmore will optimize a SUM FOR query if <expL1> is an optimizable
expression.
WHILE <expL2>
Records from currently selected database are included in the total for
as long as logical expression <expL2> evaluates to true (.T.).
TO <memvar list>
Store sums to memory variables. If you specify a memory variable that
has not been previously defined, FoxPro defines it.
TO ARRAY <array>
Stores sums to a memory variable array. If array you include in SUM
doesn't exist, FoxPro will automatically create it. If array exists and
isn't large enough to contain all the results, the size of the array is
automatically increased to accommodate information. If array is larger
than necessary, the array size is reduced as needed.
NOOPTIMIZE
Disable Rushmore optimization of SUM.
-----------------------------------
See Also: AVERAGE, CALCULATE, DECLARE, DIMENSION, TOTAL
-----------------------------------
See Also:
AVERAGE
CALCULATE
DECLARE
DIMENSION
TOTAL
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson