Links

MSCEWI1076

Constants are not supported by Snowflake Scripting. It was transformed to a variable.

Severity

Low

Description

Snowflake Scripting does not support constants. Therefore, all constants inside procedures are being transformed into variables when the Snowflake Scripting flag is active.

Example Code

Oracle:

CREATE OR REPLACE PROCEDURE p_constants
AS
my_const1 CONSTANT NUMBER := 40;
my_const2 CONSTANT NUMBER NOT NULL := 40;
BEGIN
NULL;
END;

Snowflake Scripting:

CREATE OR REPLACE PROCEDURE PUBLIC.p_constants ()
RETURNS VARCHAR
LANGUAGE SQL
EXECUTE AS CALLER
AS
$$
DECLARE
/*** MSC-WARNING - MSCEWI1076 - CONSTANTS ARE NOT SUPPORTED BY SNOWFLAKE SCRIPTING. IT WAS TRANSFORMED TO A VARIABLE ***/
my_const1 NUMBER := 40;
/*** MSC-WARNING - MSCEWI1076 - CONSTANTS ARE NOT SUPPORTED BY SNOWFLAKE SCRIPTING. IT WAS TRANSFORMED TO A VARIABLE ***/
/*** MSC-WARNING - MSCEWI3098 - NOT NULL CONSTRAINT IS NOT SUPPORTED BY SNOWFLAKE ***/
my_const2 NUMBER := 40;
BEGIN
NULL;
END;
$$;

Recommendations

  • No end-user actions are required.
  • For more support, you can email us at [email protected] or post a message to our forums. If you have a contract for support with Mobilize.Net, reach out to your sales engineer and they can direct your support needs.