MSCEWI2003
Collation not supported in trim functions, add original collation to function result to preserve it.
This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.
Severity
Low
Description
In Snowflake, trim functions (LTRIM, RTRIM,
or TRIM
) do not support collation unless the characters to trim are empty or white space characters.
If SnowConvert detects a LTRIM, RTRIM
or TRIM LEADING, TRAILING, OR BOTH
function with the scenario mentioned above, the COLLATE
function will be automatically generated to create a copy without collation of the input column. This EWI is generated to point out that the column collation was removed before the trim function, meaning the result of the function will not have collation and that this may change the results of further comparisons using the result.
Code Example
Input Code:
Output Code:
Recommendations
To avoid functional differences during comparisons, please add the original collation of the column to the
TRIM
function result string, this can be achieved using theCOLLATE
function and specifying the original column collation as the second argument, this argument has to be a literal string with the collation value.If you need more support, you can email us at snowconvert-support@snowflake.com
Last updated