SSC-EWI-TD0003
Collation not supported in trim functions, add original collation to function result to preserve it.
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.
Example Code
Teradata:
Snowflake Scripting:
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