SSC-EWI-OR0001

Sequence start value with 'LIMIT VALUE' is not supported by Snowflake.

Description

This error appears when the START WITH statement value is LIMIT VALUE.

In Oracle this clause is just use in ALTER TABLE

  • START WITH LIMIT VALUE, which is specific to identity_options, can only be used with ALTER TABLE MODIFY. If you specify START WITH LIMIT VALUE, then Oracle Database locks the table and finds the maximum identity column value in the table (for increasing sequences) or the minimum identity column value (for decreasing sequences) and assigns the value as the sequence generator's high water mark. The next value returned by the sequence generator will be the high water mark + INCREMENT BY integer for increasing sequences, or the high water mark - INCREMENT BY integer for decreasing sequences.

Example Code

Input Code:

IN -> Oracle_01.sql
CREATE SEQUENCE SEQUENCE1
  START WITH LIMIT VALUE;

Output Code:

OUT -> Oracle_01.sql
CREATE OR REPLACE SEQUENCE SEQUENCE1
  !!!RESOLVE EWI!!! /*** SSC-EWI-OR0001 - SEQUENCE START VALUE WITH 'LIMIT VALUE' IS NOT SUPPORTED BY SNOWFLAKE. ***/!!!
  START WITH LIMIT VALUE
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}';

Recommendations

Last updated