NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
S-88
Considerations—SUBTOTAL_LABEL
label
is a character string to use as a label. label consists of 0 to 255 single-byte
characters or 0 to 127 double-byte characters. The default is * (asterisk).
Considerations—SUBTOTAL_LABEL
Use of subtotal labels
The report writer uses the same subtotal label for all groups. The label prints in the
break column associated with the subtotal and is truncated if it does not fit. See
SUBTOTAL Command
on page S-85 for more information and for a sample report
with subtotal labels.
Suppressing subtotal labels
If you do not want subtotal labels to print, specify an empty string (“”) in the
SUBTOTAL_LABEL command.
Examples—SUBTOTAL_LABEL
The following command defines a subtotal label:
>> SET STYLE SUBTOTAL_LABEL "@";
SUM Function
SUM is a function that computes the sum of a set of numbers.
The type of the result depends on the type of the argument. If the argument is an exact
numeric type, the result is LARGEINT. If the argument type is FLOAT, REAL, or
DOUBLE PRECISION, the result is DOUBLE PRECISION.
The scale of the result is the same as the scale of the argument. If the argument has no
scale, the result is truncated.
[ ALL ] expression
specifies a numeric or INTERVAL expression that indicates the set of values to sum.
The expression must include a value from each row of the result table (that is, at
least one column from the result table) and cannot include the COUNT, MAX, MIN,
or AVG functions, or another SUM function, as shown:
SUM (SALARY)
SUM (PARTCOST * QTY_ORDERED)
SUM { ( [ ALL ] expression ) }
{ ( DISTINCT column ) }