SQLines provides tools to help you convert database schema (DDL), views, queries and SQL scripts from IBM DB2 to Snowflake.
Databases:
Converting functions:
DB2 | Snowflake | ||
1 | CURRENT DATE | Get the current date | CURRENT_DATE |
CURRENT_DATE |
Converting CREATE SEQUENCE statements:
DB2 | Snowflake | ||
1 | CREATE [OR REPLACE] SEQUENCE seq_name | CREATE [OR REPLACE] SEQUENCE seq_name | |
2 | INCREMENT BY num | Positive or negative increment, default is 1 | INCREMENT BY num |
3 | START WITH num | Initial value | START WITH num |
4 | MAXVALUE num | Maximum value is num | Removed |
NO MAXVALUE | System limit | Removed | |
5 | MINVALUE num | Minimum value is num | Removed |
NO MINVALUE | System limit | Removed | |
6 | CYCLE | Reuse values after reaching the limit | Removed |
NO CYCLE | No reuse, this is default | Removed | |
7 | CACHE num | Cache num values | Removed |
NO CACHE | Values are not preallocated | Removed | |
8 | ORDER | Guarantee numbers in order of requests | ORDER |
NO ORDER | No guarantee, this is default | NOORDER |
Converting SQL statements:
DB2 | Snowflake | ||
1 | CONNECT TO dbname | Connect to the database | Commented |
2 | CREATE SCHEMA schema | Create a schema | CREATE SCHEMA schema |