Oracle® OLAP DML Reference 11g Release 2 (11.2) Part Number E17122-07 |
|
|
PDF · Mobi · ePub |
The SORTLINES function sorts the lines in a multiline TEXT value.
TEXT or NTEXT
SORTLINES(text-expression [A|D])
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). The sort order is controlled by the NLS_SORT option.
Example 8-103 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