MSCEWI3068

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

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

Severity

Medium

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:

/*** MSC-ERROR - MSCEWI3068 - SEQUENCE START VALUE EXCEEDS THE MAX VALUE ALLOWED BY SNOWFLAKE. ***/
CREATE SEQUENCE PUBLIC.SEQUENCE1
--START WITH 9223372036854775808
                              ;

/*** MSC-ERROR - MSCEWI3068 - SEQUENCE START VALUE EXCEEDS THE MAX VALUE ALLOWED BY SNOWFLAKE. ***/
CREATE SEQUENCE PUBLIC.SEQUENCE2
--START WITH -9223372036854775809
                               ;

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