Available sort orders

The sort order determines the collating sequence Adaptive Server uses to order, compare, and index character data. Each character set comes with one or more sort orders.

Sort orders are located in sort order definition files (.srt files) that accompany your character-set definition files.

NoteAvailable sort orders vary according to the character set installed on Adaptive Server.

You can see the available sort orders for your character set by looking in the .srt file for your language. Sort orders are stored in the following path:

$SYBASE/charsets/<charset_name>/*.srt

%SYBASE%\charsets\<charset_name>\*.srt

For more information about localization files, see “Localization directories”.

Table 7-16 describes the sort orders that you can specify at installation time or at a later time using the sqlloc utility in Digital, HP, and SUN Solaris systems, and the asecfg utility in IBM.

Table 7-16: Sort orders available in Adaptive Server

Sort order name

Description

Binary order

Sorts all data according to numeric byte values for that character set. Binary order sorts all ASCII uppercase letters before lowercase letters. Accented or ideographic (multibyte) characters sort in their respective standards order, which may be arbitrary.

All character sets have binary order as the default. If binary order does not meet your needs, you can specify one of the other sort orders either at installation or at a later time by, using the sqlloc utility.

Dictionary order case sensitive, accent sensitive

Case sensitive. Sorts each uppercase letter before its lowercase counterpart, including accented characters. Recognizes the various accented forms of a letter and sorts them after the associated unaccented letter.

Dictionary order case insensitive, accent sensitive

Case-insensitive dictionary sort order. Uppercase letters are equivalent to their lowercase counterparts and are intermingled in sorting results.

Dictionary order case insensitive accent insensitive

Case-insensitive dictionary sort order. Diacritical marks are ignored.

Dictionary order case insensitive with preference

Case-insensitive dictionary sort order, with case preference for collating purposes. A word written with uppercase letters is equivalent to the same word written with lowercase letters.

Uppercase and lowercase letters are distinguished only when you use an order by clause. The order by clause sorts uppercase letters before it sorts lowercase.

NoteDo not select this sort order unless your installation requires that uppercase letters be sorted before lowercase letters in otherwise equivalent strings for order by clauses. Using this sort order may reduce performance in large tables when the columns specified in an order by clause match the key of the table’s clustered index.

Alternate dictionary order case sensitive

Case-sensitive alternate dictionary sort order with lowercase variants sorted before uppercase.

Use with several of the Western European languages.

Alternate dictionary order case insensitive accent insensitive

Case-insensitive and accent-insensitive alternate dictionary sort order.

Use with several of the Western European languages.

Alternate dictionary order case insensitive uppercase preference

Case-insensitive alternate dictionary sort order with uppercase preference.

Use with several of the Western European languages.

Spanish dictionary order case sensitive

Case-sensitive Spanish dictionary sort order.

Use with Spanish and for most Latin American locales.

Spanish dictionary order case insensitive

Spanish case-insensitive dictionary sort order.

Use with Spanish and for most Latin American locales.

Spanish dictionary order case insensitive accent insensitive

Spanish case-insensitive and accent-insensitive dictionary sort order.

Use with Spanish and for most Latin American locales.

Scandinavian dictionary order case sensitive

Case-sensitive dictionary sort order.

Use with Scandinavian languages.

Scandinavian dictionary order case insensitive uppercase preference

Case-insensitive and accent-insensitive dictionary sorting, with uppercase preference.

Use with Scandinavian languages.

To see the sort orders that are available, use sqlloc to display the sort orders for the character sets you plan to use.