SSC-EWI-OR0116

Operations between Intervals are not supported

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Severity

Medium

Some parts of the output code are omitted for clarity reasons.

Description

This error is added when there is an arithmetical operation whose operands are only intervals, this kind of operation is not supported by Snowflake.

Example Code

Input Code:

IN -> Oracle_01.sql
SELECT INTERVAL '1-1' YEAR(2) TO MONTH + INTERVAL '1-1' YEAR(2) + INTERVAL '1-1' YEAR(2) TO MONTH FROM dual;

SELECT INTERVALCOLUMN + INTERVAL '1-1' YEAR(2) TO MONTH FROM INTERVALTABLE;

Output Code:

OUT -> Oracle_01.sql
SELECT
--INTERVAL '1-1 year' + INTERVAL '1y, 1mm' + INTERVAL '1y, 1mm'
!!!RESOLVE EWI!!! /*** SSC-EWI-OR0116 - OPERATIONS BETWEEN INTERVALS ARE NOT SUPPORTED BY SNOWFLAKE ***/!!!
null
FROM dual;


SELECT
!!!RESOLVE EWI!!! /*** SSC-EWI-OR0036 - TYPES RESOLUTION ISSUES, ARITHMETIC OPERATION '+' MAY NOT BEHAVE CORRECTLY BETWEEN Unknown AND Interval ***/!!! INTERVALCOLUMN + INTERVAL '1y, 1mm'
FROM
INTERVALTABLE;

Recommendations

  • Depending on where the operation is located, it could be relocated and made valid by adding dates or timestamps.

  • If you need more support, you can email us at [email protected]

Last updated