BY-DSND is a modifier that sorts items in descending order. The designated attribute is called a sort-key. Multiple BY-DSND clauses can be included in an INFO/ACCESS query to specify primary and secondary sort-keys. The sort-keys are processed from left to right.
Format
BY-DSND attribute [BY-DSND attribute ...] |
Description
If BY-DSND is used with a MultiValued attribute, only the first value is sorted. To sort all the values in a MultiValued attribute, use the BY-EXP-DSND modifier.
Example
This example sorts orders in descending order by amount:
>SORT ORDERS BY-DSND AMOUNT AMOUNT DATE |
||
|
|
|
PAGE 1 |
|
11:14:03 DD MMM YYYY |
|
|
|
ORDERS.... |
AMOUNT.... |
DATE....... |
|
|
|
10110 |
$1088.00 |
25 DEC 1993 |
10104 |
$827.00 |
27 MAR 1994 |
10107 |
$761.00 |
17 MAR 1994 |
10113 |
$340.00 |
02 JUN 1994 |
10108 |
$240.00 |
30 MAY 1994 |
10105 |
$229.00 |
17 MAR 1994 |
10112 |
$220.00 |
22 MAR 1994 |
10120 |
$160.00 |
04 SEP 1994 |
10109 |
$140.00 |
22 OCT 1994 |
10111 |
$120.00 |
04 SEP 1994 |
10115 |
$109.00 |
22 OCT 1994 |
10102 |
$69.00 |
29 SEP 1994 |
10106 |
$60.00 |
11 JUL 1994 |
10121 |
$60.00 |
09 APR 1994 |
10114 |
$45.00 |
16 APR 1994 |
10116 |
$40.00 |
19 MAY 1994 |
10119 |
$40.00 |
13 DEC 1993 |
10122 |
$40.00 |
28 SEP 1994 |
10123 |
$40.00 |
01 AUG 1994 |
10124 |
$40.00 |
23 JUN 1994 |
See Also