PERCENTAGE, PERCENT, PCT, % |
![]() ![]() ![]() |
The PERCENTAGE field qualifier keyword causes a field to be reported as a percentage of the total of the value of the field in all selected records.
Format
PERCENTAGE {dp} field {field.qualifiers}
where
The PERCENTAGE 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 as a percentage of the total value of the field in all selected records. The total percentage (always 100 unless the data has changed during the query) is shown at the end of the report. Used with breakpoints, the PERCENTAGE keyword will also report the percentage value at each breakpoint.
If the field is defined as multi-valued, the PERCENTAGE keyword operates on each value in turn.
The PERCENTAGE keyword operates only on numeric data. Non-numeric values are treated as zero.
Example
The command
LIST INVOICES TOTAL VALUE PCT VALUE CUSTOMER.NAME WITH NO AMT.PAID
would produce a display such as that below.
LIST INVOICES TOTAL VALUE PCT VALUE CUSTOMER.NAME WITH NO AMT.PAID Invoice ...Value Value Customer................... 74529 £1712.43 87 J McTavish 74273 £95.23 5 County Newspapers 63940 £141.00 7 R Bryant 74993 £9.29 1 Write Right Stationery ======== ===== £1957.95 100
4 records listed. |