Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

E23381-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

CHR

CHR converts an integer to the character with its binary equivalent in either the database character set or the national character set.

For single-byte character sets, if n > 256, then CHR converts the binary equivalent of mod(n, 256).

For the Unicode national character sets and all multibyte character sets, n must resolve to one entire code point. Code points are not validated, and the result of specifying invalid code points is indeterminate.

Return Value

VARCHAR2 | NVARCHAR2

Syntax

CHR(n [ USING NCHAR_CS ]) 

Arguments

n is a numeric expression.

USING NCHAR_CS returns a character in the national character set. Otherwise, the return value is in the database character set. The OLAP engine uses the UTF8 national character set, so the return value may be different from the SQL CHR function, which uses the database UTF16 national character set.

Example

CHR(67), CHR(67 USING NCHAR_CS), and CHR(323) all return the letter C on an ASCII-based system with the WE8DEC database character set and the UTF8 national character set. CHR(323) is evaluated as CHR(MOD(323, 256)).