CHAR
Description
Returns a single-byte character with the integer sent as a parameter on the ASCII table (CHAR in Transact-SQL).
Sample Source Pattern
Syntax
CHAR( expression )Snowflake SQL complete documentation
{CHR | CHAR} ( <input> )JavaScript complete documentation
String.fromCharCode( expression1, ... , expressionN )Examples
Input:
SELECT CHAR(170) AS SMALLEST_AOutput:
SMALLEST_A|
-----------+
ª| Code:
SELECT
CHAR(170) AS SMALLEST_A;Result:
SMALLEST_A|
-----------+
ª| Code:
CREATE OR REPLACE FUNCTION get_char(expression float)
RETURNS string
LANGUAGE JAVASCRIPT
AS
$$
return String.fromCharCode( EXPRESSION );
$$;
SELECT GET_CHAR(170) SMALLEST_A;Result:
SMALLEST_A|
-----------+
ª| Last updated