MSCEWI2047

Like function does not support an argument with certain collation constraints.

triangle-exclamation

Severity

Low

Description

The function behavior in Teradata supports the use of arguments with restrictions related to COLLATIONarrow-up-right, when converted SnowFlake may support only some or none.

For example, REGEXP_REPLACE supports 'de' but not 'fr'.

Example Code

Input Code:

CREATE TABLE table1
 (
	col1 CHAR(35) CHARACTER SET LATIN NOT CASESPECIFIC,
	col2 CHAR(35) COLLATE MULTINATIONAL,
	col3 CHAR(35)
);

SELECT  * FROM table1 WHERE col1 LIKE 'sd';
SELECT (REGEXP_REPLACE(col2,'[^a-z0-9^()-/_& ]+','1', 1, 0, 'i' )) FROM table1;

Output Code:

Note in the output code that the column col1 was migrated as COLLATE, this case is not supported by SnowFlake thus resulting in a warning.

Recommendations

  • Consider changing the argument character type passed to the function.

  • If you need more support, you can email us at [email protected]envelope

Last updated