CHR()
All functions > STRING > CHR()
Returns the character corresponding to the given Unicode code point.
Signatures
Returns: The character corresponding to the code point
CHR(code_point: BIGINT) → VARCHAR sql
| Parameter | Type | Required | Description |
|---|---|---|---|
code_point | BIGINT | Yes | A BIGINT representing the Unicode code point |
Notes
- Valid code points range from 0 to 1114111 (0x10FFFF)
- Returns NULL if the input is NULL (in FeatureQL use
NULL(BIGINT); bareNULLis untyped and fails inference) - Invalid code points are rejected with an error
- This is the inverse operation of CODEPOINT
Examples
FeatureQL
SELECT
f1 := CHR(65), -- ASCII character 'A'
f2 := CHR(97), -- ASCII character 'a'
f3 := CHR(48), -- ASCII character '0'
f4 := CHR(8364), -- Euro symbol
f5 := CHR(128512), -- Emoji character
f6 := CHR(NULL(BIGINT)) -- NULL code point yields NULL
;Result
| f1 VARCHAR | f2 VARCHAR | f3 VARCHAR | f4 VARCHAR | f5 VARCHAR | f6 VARCHAR |
|---|---|---|---|---|---|
| A | a | 0 | € | 😀 | NULL |
On this page