BY.DSND

BY.DSND, BY-DSND

Top  Previous  Next

 

The BY.DSND sort clause keyword causes the query processor to sort records prior to display or when building a select list. The synonym BY-DSND may be used.

 

 

Format

 

BY.DSND {NO.CASE} field

 

where

 

fieldis the field name or evaluated expression to be used to determine the sort order.

 

 

The BY.DSND keyword causes records to be sorted into descending order of the specified field. The comparison is performed before conversion of the data to its display format. If the display format is left justified, a left justified sort is performed. Conversely, if the display format is right justified, a right justified sort is performed.

 

The optional NO.CASE keyword causes the sort to be performed in a case insensitive manner. Effectively, all comparisons are done using an uppercase version of the data being compared. Use of the QUERY.SORT.NO.CASE setting of the OPTION command implies the NO.CASE qualifier.

 

If more than one sort clause is present, sort criteria are applied in the order in which they are specified.

 

 

Example

 

The command

 

LIST INVOICES VALUE CUSTOMER.NAME WITH NO AMT.PAID BY.DSND VALUE

 

would produce a display such as that below.

 

LIST INVOICES VALUE CUSTOMER.NAME WITH NO AMT.PAID BY.DSND VALUE

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

74529    £1712.43  J McTavish

63940     £141.00  R Bryant

74273      £95.23  County Newspapers

74993       £9.29  Write Right Stationery

4 records listed.

 

 

See also:

BY, BY.EXP, BY.EXP.DSND