NLS_SORTオプションは、テキストのソートまたは比較時に使用される文字値のシーケンスを指定するオプションです。NLS_SORTの値は、GT
、GE
、LT
およびLE
演算子、SORTコマンドおよびSORTLINESファンクションに影響します。
このオプションの値はセッション内で動的に変更できます。これには、次に示すOLAP DML構文を使用するか、ALTER SESSION
SET
option
=
value
というSQL文を使用します。
例
例5-78 バイナリ・ソートと言語ソート
words
という名前のディメンション値は、次のとおりです。
cerveza, Colorado, cheremoya, llama, luna, lago
次の例は、バイナリ・ソートの結果を示します。
NLS_SORT = 'BINARY' SORT words A words STATUS words The current status of WORDS is: Colorado, cerveza, cheremoya, lago, llama, luna
スペイン語の言語ソートの結果は、次の順序になります。
NLS_SORT = 'SPANISH' SORT words A words STATUS words The current status of WORDS is: cerveza, cheremoya, Colorado, lago, llama, luna
スペイン語の拡張言語ソートの結果は、次の順序になります。
NLS_SORT = 'XSPANISH' SORT words A words STATUS words The current status of WORDS is: cerveza TO cheremoya, lago TO llama