Neoview SQL Reference Manual (R2.5)
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 a Neoview SQL extension.
ASCII (character-expression)
character-expression
is an SQL character value expression that specifies a string of characters. See “Character Value
Expressions” (page 255).
Considerations for ASCII
On a Neoview platform that has the SJIS or Unicode configuration, if the value of the first byte
in the string is greater than 127, Neoview SQL returns this error message:
ERROR[8428] The argument to function ASCII is not valid.
For more information on the SJIS and Unicode configurations, see the Neoview Character Sets
Administrator's Guide.
Example 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 Function 347