SSC-EWI-PG0015

Fetch cursor without target variables is not supported in Snowflake

Severity

Medium

Description

In PostgreSQL, it is possible to use a FETCH statement without INTO to print on the console the values of fetched rows. However, Snowflake requires the FETCH statement to specify the INTO clause with the variables where the fetched row values are going to be stored.

Whenever a FETCH with no INTO is found in the code, SnowConvert will generate this EWI to notify the user that this type of FETCH is not supported.

Code Example

Input Code:

IN -> PostgreSQL_01.sql
FETCH PRIOR FROM cursor1;

Output Code:

OUT -> PostgreSQL_01.sql
!!!RESOLVE EWI!!! /*** SSC-EWI-PG0015 - FETCH CURSOR WITHOUT TARGET VARIABLES IS NOT SUPPORTED IN SNOWFLAKE ***/!!!
FETCH PRIOR FROM cursor1;

Recommendations

Last updated