SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual540440-003
9-27
CODE_VALUE Function
CODE_VALUE Function
The CODE_VALUE function returns an unsigned integer (INTEGER UNSIGNED) that
is the code point of the first character in a character value expression that can be
associated with any character sets allowed.
CODE_VALUE is an SQL/MX extension.
character-value-expression
is a character string.
Considerations for CODE_VALUE Function
This function returns 97 as the result:
>>select code_value('abc') from (values(1))x;
(EXPR)
----------
97
CODE_VALUE(character-value-expression)