Output Code

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

Source Code

Suppose this is the SQL Server source code you've migrated:

CREATE TABLE! TABLE_Invalid
(
  COL1 VARCHAR2(255),
  COL2 VARCHAR2!
)
GO

CREATE TABLE TABLE1
(
  COL1 INT,
  COL2 VARCHAR2!
)
GO

CREATE OR REPLACE VIEW VIEW1
AS
    SELECT 
        UNSUPPORTED_FUNCTION(1), 
        COL1, 
        COL2 
    FROM TABLE1
GO

Output code

-- ** MSC-ERROR - MSCEWI1001 - UNRECOGNIZED TOKEN ON LINE 1 OF THE SOURCE CODE. **
--CREATE TABLE! TABLE_Invalid
--(
--  COL1 VARCHAR2(255),
--  COL2 VARCHAR2!
--)
-- ** MSC-WARNING - MSCEWI1040 - THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE **
--GO

CREATE OR REPLACE TABLE PUBLIC.TABLE1
(
COL1 INT,
-- ** MSC-ERROR - MSCEWI1001 - UNRECOGNIZED TOKEN ON LINE 11 OF THE SOURCE CODE. **
--  COL2 VARCHAR2!
);
-- ** MSC-WARNING - MSCEWI1040 - THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE **
--GO

CREATE OR REPLACE VIEW PUBLIC.VIEW1
AS
SELECT PUBLIC.UNSUPPORTED_FUNCTION_UDF('UNSUPPORTED_FUNCTION(1)') /*** MSC-ERROR - MSCEWI1031 - UNSUPPORTED_FUNCTION FUNCTION NOT SUPPORTED ***/,
COL1,
COL2
FROM PUBLIC.TABLE1;
-- ** MSC-WARNING - MSCEWI1040 - THE STATEMENT IS NOT SUPPORTED IN SNOWFLAKE **
--GO

How to interpret the output code?

  • There is one parsing error in line number one. This is because of an invalid token CREATE TABLE!

  • There is one parsing error in line number three and number 11. This is because of an invalid tokenVARCHAR2!

  • There is a not supported function UNSUPPORTED_FUNCTION , which is converted to a UNSUPPORTED_FUNCTION_UDF stub that means SnowConvert was not able to find a functional equivalent function to use instead.

  • The GO command in lines 6, 13 and 22 is not applicable in Snowflake, that is the reason why it is commented. A SEMICOLON (;) is added to each statement instead in order to make the code valid.

Last updated