RANGE

RANGE

Top  Previous  Next

 

The RANGE field qualifier keyword causes a field to be reported together with its range value.

 

 

Format

 

RANGE field {field.qualifiers} {NO.NULLS}

 

where

 

fieldis the field or evaluated expression to be displayed.

 

field.qualifiers are other field qualifying keywords

 

NO.NULLScauses null values to be ignored.

 

 

The RANGE 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 range value (the difference between the minimum and maximum value) at the end of the report. Used with breakpoints, the RANGE keyword will also report the range value of the field at each breakpoint.

 

Where more than more than one value shares the most frequent occurrence, it is not defined which one will be shown.

 

If the field is defined as multivalued, the RANGE keyword operates on each value in turn.

 

The RANGE keyword operates only on numeric data. Non-numeric values are ignored except that the default behaviour is to treat null items as zero. The NO.NULLS keyword can be used to prevent null values being included in the calculation of the range value.

 

 

Example

 

The sentence

 

LIST INVOICES RANGE VALUE CUSTOMER.NAME WITH NO AMT.PAID

 

would produce a display such as that below in which the range value of the VALUE field is included at the end of the report.

 

LIST INVOICES RANGE VALUE CUSTOMER.NAME WITH NO AMT.PAID

Invoice  ...Value  Customer...................

74529    £1712.43  J McTavish

74273      £95.23  County Newspapers

28137      £26.20  J Higgins

63940     £141.00  R Bryant

74993       £9.29  Write Right Stationery

        ========

        £1703.14

5 records listed.

 

 

See also:

AVERAGE, MEDIAN, MODE