Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Functions : CHAR


Returns a character string with the first character having an ASCII value equal to the argument expression. CHAR is identical to CHR but provides ODBC‑compatible syntax.


CHAR ( integer_expression )


*The argument to the function must be of type INTEGER, TINYINT, or SMALLINT.
*The result is of type CHARACTER.
*If the argument integer_expression evaluates to NULL, the result is NULL.
*The CHAR and CHR functions are character‑set dependent and support single‑byte and multi‑byte characters. If integer_expression is a valid character encoding integer value in the current SQL server character set, the function returns the correct character. If it is not a valid character, the function returns a NULL value.


This example illustrates the CHAR function:
    FROM customer
    WHERE SUBSTR (zip, 1, 1) = CHAR (53) ;


ODBC compatible