The first form of this command can be used to sort non-UDT arrays into order. If used on a UDT array, an error will be triggered.
The second form of this command can be used to sort UDT arrays into order. If used on a non-UDT array, an error will be triggered.
Fields are specified numerically - 1 is the first field, etc. If you specify a field that is beyond the end of the format provided, an error will be triggered. It is not an error to specify a field of 0, but the field will be ignored.
If the field is specified as a negative number, the field will be sorted in reverse sequence.
When sorting strings, null strings and empty are arranged first (and are treated as equal), then by ASCII value of the string contents.
When sorting an array with start and end positions specified, the start position must be lower than the end position, otherwise sorting will not take place. |