TOTAL |
![]() ![]() ![]() |
The TOTAL field qualifier keyword causes a field to be reported together with its total value.
Format
TOTAL field {field.qualifiers}
where
The TOTAL field qualifier keyword is placed before the field name to which it applies and causes the query processor to report the value of the field for each record processed and also to report the total value at the end of the report. Used with breakpoints, the TOTAL keyword will also report the total value of the field at each breakpoint.
If the field is defined as multi-valued, the TOTAL keyword operates on each value in turn.
The TOTAL keyword operates only on numeric data. Non-numeric values are ignored.
Example
The command
LIST INVOICES TOTAL VALUE CUSTOMER.NAME WITH NO AMT.PAID
would produce a display such as that below in which the total value of the VALUE field is included at the end of the report.
LIST INVOICES TOTAL VALUE CUSTOMER.NAME WITH NO AMT.PAID Invoice ...Value Customer................... 74529 £1712.43 J McTavish 74273 £95.23 County Newspapers 63940 £141.00 R Bryant 74993 £9.29 Write Right Stationery ======== £1957.95 4 records listed. |