Export (0) Print
Expand All

Sum

SQL Server 2000

Sum

Returns the sum of a numeric expression evaluated over a set.

Syntax

Sum(«Set»[, «Numeric Expression»])

Example

If the respective values for the USA, CANADA and MEXICO members are 1000, 2000, and 3000, the following example returns 6000:

Sum({USA, CANADA, MEXICO}, Sales.VALUE)

The following example, which is more intuitive, is also valid:

Sum({USA, CANADA, MEXICO}, Sales)
Show:
© 2014 Microsoft