MSCEWI3007

Output may not consider TIMEZONE_MINUTE.

Severity

Low

Description

Source code and converted code outputs may be different due to a difference in the behavior of the EXTRACT function in Oracle and Snowflake.

Example Code

Input Code:

SELECT EXTRACT(MINUTE FROM TIMESTAMP '1999-01-01 10:24:34 -08:15') FROM DUAL;
-- This is the output for this code: 39

Output Code:

SELECT
 /*** MSC-WARNING - MSCEWI3007 - OUTPUT MAY NOT CONSIDER TIMEZONE_MINUTE ***/
 EXTRACT(MINUTE FROM TIMESTAMP '1999-01-01 10:24:34 -08:15') FROM DUAL;

-- This is the output for this code: 24

Note that the converted output is not considering the minutes as a part of the '-08:15' in the operation.

Recommendations

  • Consider the difference in both outputs in order to fix the operation.

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

Last updated