MSCEWI1012

Unexpected end of the statement.

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

Severity

High

Description

This error appears when there is an unexpected end of the statement in the source code

Example Code

Input Code:

CREATE VOLATILE SET TABLE VOLATILETABLE
(
    COL1                    INTEGER,
    COL2                    INTEGER,
    COL3                    INTEGER
)
ON COMMIT PRESERVE ROWS;
UPDATE TABLE2 as T2
SET T2.COL1 + VOLATILETABLE.COL1
WHERE T2.COL2 = VOLATILETABLE.COL2
    AND T2.COL3 = VOLATILETABLE.COL3
    AND     T2.COL4 = ( SELECT MAX(T3.COL1) 
                                   FROM
                                   TABLE3 T3
                                   WHERE T3.COL1 = T2.COL1);

Output Code:

/*** MSC-WARNING - MSCEWI2015 - SET TABLE FUNCTIONALITY NOT SUPPORTED ***/
CREATE TEMPORARY TABLE PUBLIC.VOLATILETABLE
(
COL1                    INTEGER,
COL2                    INTEGER,
COL3                    INTEGER
);

UPDATE PUBLIC.TABLE2 AS T2 SET --** MSC-ERROR - MSCEWI1012 - UNEXPECTED END OF STATEMENT. PLEASE CHECK THE LINE 9 OF ORIGINAL SOURCE CODE. **T2.COL1 + VOLATILETABLE.COL1 FROM VOLATILETABLE AS PUBLIC_VOLATILETABLE
WHERE T2.COL2 = PUBLIC_VOLATILETABLE.COL2
AND T2.COL3 = PUBLIC_VOLATILETABLE.COL3
AND     T2.COL4 = (SELECT
MAX(T3.COL1)
FROM PUBLIC.TABLE3 T3
WHERE T3.COL1 = T2.COL1);

Recommendation

  • Check if the source code is incomplete or if the statement that is being converted ends correctly.

  • If you need more support, you can email us at snowconvert-support@snowflake.com

Last updated