MSCEWI5011

ASSIGNMENT CLAUSE TYPE IS NOT SUPPORTED IN SNOWFLAKE

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Medium

Description

This message is displayed when the assignment clause contains an expression not supported by Snowflake

Cases

Update Statement

When an assignment clause presents a multi-column assignment of a row selection, an example of this can be found in the Code example section.

Code Example

DB2

UPDATE EMPLOYEE EU
    SET (EU.COM, EU.SALARY) = (SELECT ES.SALARY FROM EMPLOYEE ES WHERE ES.WORKDEPT = EU.WORKDEPT)
    WHERE EU.EMPNO = '000120';

UPDATE TABLE1 T1
    SET (T1.COL1, T1.COL2, T1.COL3 ) = ((SELECT T2.COL1 FROM TABLE2 T2 WHERE T2.COL2 = T1.COL2), 12);

Snowflake

-- ** MSC-ERROR - MSCEWI5011 - ASSIGNMENT CLAUSE IS NOT SUPPORTED IN SNOWFLAKE **
--UPDATE EMPLOYEE EU
--    SET (EU.COM, EU.SALARY) = (SELECT ES.SALARY FROM EMPLOYEE ES WHERE ES.WORKDEPT = EU.WORKDEPT)
--    WHERE EU.EMPNO = '000120'

-- ** MSC-ERROR - MSCEWI5011 - ASSIGNMENT CLAUSE IS NOT SUPPORTED IN SNOWFLAKE **
--UPDATE TABLE1 T1
--    SET (T1.COL1, T1.COL2, T1.COL3 ) = ((SELECT T2.COL1 FROM TABLE2 T2 WHERE T2.COL2 = T1.COL2), 12)

Recommendations

Last updated