BY |
![]() ![]() ![]() |
The BY sort clause keyword causes the query processor to sort records prior to display or when building a select list.
Format
BY field
where
The BY keyword causes records to be sorted into ascending 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.
If more than one sort clause is present, sort criteria are applied in the order in which they are specified.
The command
LIST BOOKS BY @ID
is identical to
SORT BOOKS
Example
The command
LIST INVOICES VALUE CUSTOMER.NAME WITH NO AMT.PAID BY VALUE
would produce a display such as that below.
LIST INVOICES VALUE CUSTOMER.NAME WITH NO AMT.PAID BY VALUE Invoice ...Value Customer................... 74993 £9.29 Write Right Stationery 74273 £95.23 County Newspapers 63940 £141.00 R Bryant 74529 £1712.43 J McTavish 4 records listed.
See also: |