23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAR<br />

CHAR<br />

Syntax<br />

84<br />

Returns a character string with the first character having an ASCII value equal to the argument<br />

expression. CHAR is identical to CHR but provides ODBC-compatible syntax.<br />

Example This example illustrates the CHAR function:<br />

Notes • The argument to the function must be of type INTEGER, TINYINT, or SMALLINT.<br />

CHR<br />

Syntax<br />

CHAR ( integer_expression )<br />

SELECT *<br />

FROM customer<br />

WHERE SUBSTR (zip, 1, 1) = CHAR (53) ;<br />

• The result is of type CHARACTER.<br />

• If the argument integer_expression evaluates to NULL, the result is NULL.<br />

• The CHAR and CHR functions are character-set dependent and support single-byte and<br />

multi-byte characters. If integer_expression is a valid character encoding integer value<br />

in the current <strong>SQL</strong> server character set, the function returns the correct character. If it is<br />

not a valid character, the function returns a NULL value.<br />

Compatibility<br />

ODBC compatible<br />

Returns a character string with the first character having an ASCII value equal to the argument<br />

expression.<br />

CHR ( integer_expression )<br />

Example This example illustrates the CHR function and the SUBSTR (substring) function:<br />

SELECT *<br />

FROM customer<br />

WHERE SUBSTR (zip, 1, 1) = CHR (53) ;<br />

Notes • The argument to the function must be of type INTEGER, TINYINT, or SMALLINT.<br />

• The result is of type CHARACTER.<br />

• If the argument integer_expression evaluates to NULL, the result is NULL.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!