Entering content frame

ALPHA(x,n) 

ALPHA(x,n) is a string function that enables a character x in ASCII to be converted to a different one or two-character representation defined in the DEFAULTMAP (mapchar_set_name). ALPHA(x,n) is used to define the sort sequence.

The function ALPHA(x,n) uses the MAPCHAR(x,n,i) function internally (where i is the DEFAULTMAP) and also performs a conversion to uppercase letters (UPPER(x)).

The parameter n is optional, n specifies the maximum length of the result.

 

Result of the ALPHA(x,n) function

ALPHA(x,n)

UPPER(MAPCHAR(x,n,DEFAULTMAP))

The ALPHA function enables data to be sorted practically, for example, if "ü" is to be treated as "UE" for sorting purposes. The MAPCHAR SET with the name DEFAULTMAP is used.

SELECT...,ALPHA(<column name>) sort,...FROM...ORDER BY sort

 

Leaving content frame