Anyone can explain why to_varchar function in Snowflake adds space in front of output:
For example,
SELECT TO_VARCHAR(10101, '000000');
-- ouput: ' 010101'
SELECT LEN(TO_VARCHAR(10101, '000000'))
-- ouput: 7
I could wrap it with TRIM, but would like to understand behavior instead of adding unnecessary functions
You need to sign in to view this answers
Leave feedback about this