MSCEWI3092

NUMBER datatype negative scale was removed from output

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

Severity

Low

Description

This issue happens when a NUMBER with a negative scale is being used to apply rounding to the NUMBER. Snowflake does not support this feature, and this message is used to indicate that the Scale was removed.

Example Code

Input Code:

CREATE TABLE number_table
(
	col1 NUMBER(38),
	col2 NUMBER(38, -1),
	col3 NUMBER(*, -2)
);

INSERT INTO number_table(col1, col2, col3) VALUES (555, 555, 555);

SELECT * FROM number_table;

Output Code:

CREATE OR REPLACE TABLE PUBLIC.number_table (
col1 NUMBER (38) /*** MSC-WARNING - MSCEWI1066 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE ***/,
col2 NUMBER (38) /*** MSC-WARNING - MSCEWI3092 - NUMBER DATATYPE NEGATIVE SCALE WAS REMOVED FROM OUTPUT ***/ /*** MSC-WARNING - MSCEWI1066 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE ***/,
col3 NUMBER (38) /*** MSC-WARNING - MSCEWI3092 - NUMBER DATATYPE NEGATIVE SCALE WAS REMOVED FROM OUTPUT ***/ /*** MSC-WARNING - MSCEWI1066 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE ***/);

INSERT INTO PUBLIC.number_table(col1, col2, col3) VALUES (555, 555, 555);

SELECT * FROM PUBLIC.number_table;

Recommendations

Last updated