SQL/MX 2.x Reference Manual (G06.24+, H06.03+)
SQL/MX Functions and Expressions
HP NonStop SQL/MX Reference Manual—523725-004
9-25
CHAR Function
CHAR Function
The CHAR function returns the character that has the specified code value, which must 
be of exact numeric with scale 0.
CHAR is an SQL/MX extension. 
code-value
is a valid code value in the character set in use. 
char-set-name
can be ISO88591, KANJI, KSC5601, or UCS2. The returned character will be 
associated with the character set specified by char-set-name with the DEFAULT 
collation. 
The default is ISO88591.
Examples of CHAR
•
Select the column CUSTNAME and return the ASCII code of the first character of 
the customer name and its CHAR value:
SELECT custname, ASCII (custname), CHAR (ASCII (custname)) 
FROM sales.customer;
CUSTNAME (EXPR) (EXPR) 
------------------ ------- -------
CENTRAL UNIVERSITY 67 C 
BROWN MEDICAL CO 66 B 
STEVENS SUPPLY 83 S 
PREMIER INSURANCE 80 P 
... ... ... 
--- 15 row(s) selected.
CHAR(code-value, [,char-set-name])










