MAPCHAR(x,n,i)

MAPCHAR(x,n,i) is a string function that converts country-specific letters to a different format (for example, German umlauts, French letters with a grave accent).

MAPCHAR(x,n,i) uses the MapChar set with the name i (mapchar set name) to convert the character string x (string specification). Only expressions that supply an alphanumeric value are permitted as string specifications. If you do not specify a MapChar set name, the MapChar set with the name DEFAULTMAP (defined for the ASCII code) is used.

The code on which the character string x is based and the code on which the implemented MapChar set is based must match.

The parameter n (unsigned integer) is optional; n specifies the maximum length of the result.

Result of the MAPCHAR(x,n,i) function

MAPCHAR(x,i)

MAPCHAR(x,n,i), where n is the length of the character string x

MAPCHAR(x,i)
x is CHAR or VARCHAR column

MAPCHAR(x,n,i), where n is the length of the column x

MAPCHAR(x)

MAPCHAR(x,DEFAULTMAP)

x is a NULL value

NULL value

The MAPCHAR function enables data to be sorted correctly, for example, if "ь" is to be treated as "ue" for sorting purposes. The MapChar set with the name DEFAULTMAP is used.

SELECT...,MAPCHAR(<column_name>) sort,...FROM...ORDER BY sort