SSC-FDM-OR0002

The sequence start value exceeds the max value allowed by Snowflake.

This FDM is deprecated, please refer to SSC-EWI-OR0068 documentation

Description

This error appears when the START WITH statement value exceeds the maximum value allowed by Snowflake. What Snowflake said about the start value is: Specifies the first value returned by the sequence. Supported values are any value that can be represented by a 64-bit two’s compliment integer (from -2^63 to 2^63-1). So according to the previously mentioned, the max value allowed is 9223372036854775807 for positive numbers and 9223372036854775808 for negative numbers.

Example Code

Input Code:

CREATE SEQUENCE SEQUENCE1
START WITH 9223372036854775808;
CREATE SEQUENCE SEQUENCE2
START WITH -9223372036854775809;

Output Code:

CREATE OR REPLACE SEQUENCE SEQUENCE1
--** SSC-FDM-OR0002 - SEQUENCE START VALUE EXCEEDS THE MAX VALUE ALLOWED BY SNOWFLAKE. **
START WITH 9223372036854775808
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}';
CREATE OR REPLACE SEQUENCE SEQUENCE2
--** SSC-FDM-OR0002 - SEQUENCE START VALUE EXCEEDS THE MAX VALUE ALLOWED BY SNOWFLAKE. **
START WITH -9223372036854775809
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}';

Recommendations

  • It can be recommended to just reset the sequence and modify its usage too. NOTE: the target column must have enough space for holding this value.

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

Last updated