Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-03 |
|
|
View PDF |
The CHR function returns the character having the specified binary value in the database character set.
SQL syntax
CHR(n)
Parameters
CHR has the parameter:
Parameter | Description |
---|---|
n |
The binary value in the database character set. The character having this binary value is returned. The result is of type VARCHAR2. |
Description
For single-byte character sets, if n >256, then TimesTen returns the binary value of n mod 256.
For multibyte character sets, n must resolve to one code point. Invalid code points are not validated. If you specify an invalid code point, the result is indeterminate.
Note:
When you use the CHR function, the code is not portable between ASCII- and EBCDIC- based machine architectures.Examples
The following example is run on an ASCII-based machine with the WE8ISO8859P1 character set.
Command> SELECT CHR(67)||CHR(65)||CHR(84) FROM DUAL; < CAT > 1 row found.
On an EBCDIC-based machine with the character set WE8EBCDIC1047, the preceding example would have to be modified to the following:
Command> SELECT CHR(195)||CHR(193)||CHR(227) FROM DUAL; < CAT > 1 row found.