SPACE ( integer_expression )
Custom function used to emulate the behavior
function SPACE( occurrences ){
return ' '.repeat( occurrences );
}
Input:
SELECT CONCAT('SOME', SPACE(5), 'TEXT') AS RESULT;
Output:
RESULT |
-------------+
SOME TEXT|
Input:
SELECT CONCAT('SOME', SPACE(5), 'TEXT') AS RESULT;
Output:
RESULT |
-------------+
SOME TEXT|
Input:
CREATE OR REPLACE FUNCTION SPACE(occurrences float)
RETURNS string
LANGUAGE JAVASCRIPT
AS
$$
function SPACE( occurrences ){
return ' '.repeat( occurrences );
}
return SPACE( OCCURRENCES );
$$;
SELECT CONCAT('SOME', SPACE(5), 'TEXT') RESULT;
Output:
RESULT |
-------------+
SOME TEXT|