SQL/MX 3.2 Reference Manual (H06.25+, J06.14+)

SQL/MX Functions and Expressions
HP NonStop SQL/MX Release 3.2 Reference Manual691117-001
9-11
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-41.
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)