The SORTKEY
function creates a linguistic sort key for data. You must enter at
least one argument. If the length of the variable that receives the
key is not large enough, the data truncates, and a warning is displayed.
Locale values use the
POSIX name (ll_RR). LL represents the two-letter language code, and
RR represents the two-letter region code. For example, en_US is the
POSIX name for English, United States. en represents the English language,
and US represents the United States. If a locale value is not specified,
then the session locale is used.
The strength argument
determines whether accents or case affect collating or matching text.
If no value is specified for strength, then the locale determines
the value. The following values can be specified for strength.
This value includes
base letters, for example, the letters, A, a, and Å are all processed
the same.
This value processes
data the same as PRIMARY, and accents are processed. The letters A
and a are processed equally, and Å is processed as an accented
character.
This value processes
data the same as SECONDARY, and the character's case is processed.
For example, A, a, and Å are all processed differently.
This value processes
data the same as TERTIARY, and punctuation is processed.
This value process
data the same as QUATERNARY, and code point is processed.
specifies to sort data
using upper case or lower case letter. The following table shows examples
of specifying the UPPER value or the LOWER value.
The collation order
value PHONEBOOK is ignored unless the locale is a German language.
The collation order
value TRADITIONAL is ignored unless the locale is a Spanish language.
A warning message displays
for other locales.