NLS_SORT

The NLS_SORT attribute indicates which collating sequence to use for linguistic comparisons.

It accepts the monolingual and multilingual values from the Supported Linguistic Sorts tables. All these values can be modified to do case-insensitive sorts by appending _CI to the value. To perform accent-insensitive and case-insensitive sorts, append _AI to the value.

For materialized views and cache groups, TimesTen recommends that you explicitly specify the collating sequence using the NLSSORT SQL function rather than using this attribute in the connection string or DSN definition.

Operations involving character comparisons support linguistic case-sensitive collating sequences. Case-insensitive sorts may affect DISTINCT value interpretation.

NLS_SORT may affect many operations. The supported operations that are sensitive to collating sequence are:

  • MIN, MAX

  • BETWEEN

  • =, <>, >, >=, <, <=

  • DISTINCT

  • CASE

  • GROUP BY

  • HAVING

  • ORDER BY

  • IN

  • LIKE

NLS_SORT settings other than BINARY may have significant performance impact on character operations.

NLS_SORT can be modified by an ALTER SESSION SQL statement, described in Oracle TimesTen In-Memory Database SQL Reference.

Note:

Primary key indexes are always based on the BINARY collating sequence. Use of non-BINARY NLS_SORT equality searches cannot use the primary key index.

Required Privilege

No privilege is required to change the value of this attribute.

Usage in TimesTen Scaleout and TimesTen Classic

This attribute is supported in both TimesTen Classic and TimesTen Scaleout.

Setting

Set NLS_SORT as follows:

Where to set the attribute How the attribute is represented Setting

C or Java programs or UNIX and Linux systems odbc.ini file in TimesTen Classic or in the database definition (.dbdef) file in TimesTen Scaleout

NLS_SORT

Specify the linguistic sort sequence or BINARY (default).

Windows ODBC Data Source Administrator

Not applicable

Supported Linguistic Sorts

The tables in this section list the supported values for the NLS_SORT general connection attribute and the NLS_SORT SQL function.

Monolingual Linguistic Sorts

Basic name Extended name

ARABIC

N/A

ARABIC_MATCH

N/A

ARABIC_ABJ_SORT

N/A

ARABIC_ABJ_MATCH

N/A

ASCII7

N/A

AZERBAIJANI

XAZERBAIJANI

BENGALI

N/A

BIG5

N/A

BINARY

N/A

BULGARIAN

N/A

CANADIAN FRENCH

N/A

CATALAN

XCATALAN

CROATIAN

XCROATIAN

CZECH

XCZECH

CZECH_PUNCTUATION

XCZECH_PUNCTUATION

DANISH

XDANISH

DUTCH

XDUTCH

EBCDIC

N/A

EEC_EURO

N/A

EEC_EUROPA3

N/A

ESTONIAN

N/A

FINNISH

N/A

FRENCH

XFRENCH

GERMAN

XGERMAN

GERMAN_DIN

XGERMAN_DIN

GBK

N/A

GREEK

N/A

HEBREW

N/A

HKSCS

N/A

HUNGARIAN

XHUNGARIAN

ICELANDIC

N/A

INDONESIAN

N/A

ITALIAN

N/A

LATIN

N/A

LATVIAN

N/A

LITHUANIAN

N/A

MALAY

N/A

NORWEGIAN

N/A

POLISH

N/A

PUNCTUATION

XPUNCTUATION

ROMANIAN

N/A

RUSSIAN

N/A

SLOVAK

XSLOVAK

SLOVENIAN

XSLOVENIAN

SPANISH

XSPANISH

SWEDISH

N/A

SWISS

XSWISS

THAI_DICTIONARY

N/A

TURKISH

XTURKISH

UKRAINIAN

N/A

UNICODE_BINARY

N/A

VIETNAMESE

N/A

WEST_EUROPEAN

XWEST_EUROPEAN

Multilingual Linguistic Sorts

Sort Name Description

CANADIAN_M

Canadian French sort supports reverse secondary, special expanding characters.

DANISH_M

Danish sort supports sorting uppercase characters before lowercase characters.

FRENCH_M

French sort supports reverse sort for secondary.

GENERIC_M

Generic sorting order which is based on ISO14651 and Unicode canonical equivalence rules but excluding compatible equivalence rules.

JAPANESE_M

Japanese sort supports SJIS character set order and EUC characters which are not included in SJIS.

KOREAN_M

Korean sort Hangul characters are based on Unicode binary order. Hanja characters based on pronunciation order. All Hangul characters are before Hanja characters.

SPANISH_M

Traditional Spanish sort supports special contracting characters.

THAI_M

Thai sort supports swap characters for some vowels and consonants.

SCHINESE_RADICAL_M

Simplified Chinese sort is based on radical as primary order and number of strokes order as secondary order.

SCHINESE_STROKE_M

Simplified Chinese sort uses number of strokes as primary order and radical as secondary order.

SCHINESE_PINYIN_M

Simplified Chinese Pinyin sorting order.

TCHINESE_RADICAL_M

Traditional Chinese sort based on radical as primary order and number of strokes order as secondary order.

TCHINESE_STROKE_M

Traditional Chinese sort uses number of strokes as primary order and radical as secondary order. It supports supplementary characters.