Oracle® OLAP DML Reference 10g Release 1 (10.1) Part Number B10339-02 |
|
|
View PDF |
The SORTLINES function sorts the lines in a multiline TEXT value.
Return Value
TEXT or NTEXT
Syntax
SORTLINES(text-expression [A|D])
Arguments
A multiline text expression whose lines SORTLINES sorts. When you specify a TEXT expression, the return value is TEXT. When you specify an NTEXT expression, the return value is NTEXT.
Specifies whether the sorting order should be ascending, or alphabetical (A), or descending, or reverse alphabetical (D). The default is A (ascending).
Notes
The sort order is controlled by the NLS_SORT option.
Examples
Example 21-44 Sorting Text Lines
This example shows how to sort the lines in a multiline text value in a variable called MKTREGIONS.
The statement
SHOW mktregions
produces the following output.
New York Boston Atlanta San Francisco
The statement
SHOW SORTLINES(mktregions)
produces the following output.
Atlanta Boston New York San Francisco