Collating Sequences

The sort order (collating sequence) on your SAP ASE server determines how your data is sorted.

With order by, null values precede all others.

The sort order choices are binary, dictionary, case-insensitive, case-insensitive with preference, and case- and accent-insensitive. Sort orders that are specific to national languages may also be provided.

sp_helpsort reports the sort order installed on the SAP ASE server.

The effect of sort order choices are:

SAP ASE Sort Order

Effects on order by Results

Binary order

Sorts all data according to the numeric byte-value of each character in the character set. Binary order sorts all uppercase letters before lowercase letters. Binary sort order is the only option for multibyte character sets.

Dictionary order

Sorts uppercase letters before their lowercase counterparts (case-sensitive). Dictionary order recognizes the various accented forms of a letter and sorts them after the unaccented form.

Dictionary order, case-insensitive

Sorts data in dictionary order but does not recognize case differences.

Dictionary order, case-insensitive with preference

Sorts an uppercase letter in the preferred position, before its lowercase version. It does not recognize case difference when performing comparisons (for example, in where clauses).

Dictionary order, case- and accent-insensitive

Sorts data in dictionary order, but does not recognize case differences; treats accented forms of a letter as equivalent to the associated unaccented letter. This sort order intermingles accented and unaccented letters in sorting results.