SQL/MX 2.x Reference Manual (G06.24+, H06.03+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual523725-004
9-12
ASCII Function
ASCII Function
The ASCII function returns the integer that is the ASCII code of the first character in a
character string expression associated with the ISO8891 character set.
ASCII is an SQL/MX extension.
character-expression
is an SQL character value expression that specifies a string of characters. See
Character Value Expressions on page 6-39.
Examples of ASCII
Select the column JOBDESC and return the ASCII code of the first character of the
job description:
SELECT jobdesc, ASCII (jobdesc)
FROM persnl.job;
JOBDESC (EXPR)
----------------- --------
MANAGER 77
PRODUCTION SUPV 80
ASSEMBLER 65
SALESREP 83
... ...
--- 10 row(s) selected.
ASCII (character-expression)