SSC-EWI-OR0092

NUMBER datatype negative scale was removed from output

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 Oracle:

IN -> Oracle_01.sql
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:

OUT -> Oracle_01.sql
CREATE OR REPLACE TABLE number_table
	(
		col1 NUMBER(38) /*** SSC-FDM-0006 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE. ***/,
		col2 NUMBER(38) !!!RESOLVE EWI!!! /*** SSC-EWI-OR0092 - NUMBER DATATYPE NEGATIVE SCALE WAS REMOVED FROM OUTPUT ***/!!! /*** SSC-FDM-0006 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE. ***/,
		col3 NUMBER(38) !!!RESOLVE EWI!!! /*** SSC-EWI-OR0092 - NUMBER DATATYPE NEGATIVE SCALE WAS REMOVED FROM OUTPUT ***/!!! /*** SSC-FDM-0006 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE. ***/
	)
	COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'
	;

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

	SELECT * FROM
	number_table;

Recommendations

Last updated