This page will help you troubleshoot possible differences whilst upgrading from VERTICA to SNOWFLAKE
Please be aware Snowflake columns are all CAPITALIZED
invalid identifier ‘SYSDATE’
Snowflake requires function brackets when using sysdate:
Unknown function ISNULL
Snowflake uses ifnull instead of isnull:
Unknown function NOW
Now function does not exist in Snowflake use CURRENT_TIMESTAMP()
Invalid result
Values of param = null will not give the same results as param is null
select CASE WHEN platform = NULL then 'no platform' end as "missingPlatform", CASE WHEN platform != null then platform end as "Platform Name" from events_live
select CASE WHEN platform IS NULL then 'no platform' end as "missingPlatform", CASE WHEN platform is not null then platform end as "Platform Name" from events_live
Invalid identifier ‘COUNT’
When using count you need to specify a column name if you plan to use the count further in your query
Invalid argument types for function ‘-‘: (TIMESTAMP_NTZ(9), TIMESTAMP_NTZ(9))
You cannot minus two date timestamps in Snowflake instead use DATEDIFF
TRIM different syntax – syntax error line 3 at position 34 unexpected ‘)’.
Trim syntax differs from Vertica to snowflake
Unsupported data type ‘MONEY’.
MONEY not a supported Snowflake function
Invalid argument types for function ‘+’: (TIMESTAMP_LTZ(9), NUMBER(1,0))
Use TIMESTAMPADD to add days months years to a timestamp
ERROR: Unsupported feature ‘^’.
^2 is not supported in snowflake instead use SQUARE(2)
Syntax error at or near “INTERVAL”
Using interval in snowflake requires the following text to be in single quotations
ERROR: Timestamp ‘today’ is not recognized
Today is not a valid snowflake parameter instead use current_date() or sysdate()
ERROR: Division by zero
Vertica allowed some division that would not pass on other databases. Use DIV0 to safely divide by a potential 0 value
Unknown function BOOL_OR
the syntax between both functions are different. Remove the underscore for snowflake
Unsupported feature ^
The ^ shortcut for the Power function is not supported in Snowflake