SSC-EWI-PG0015

Fetch cursor without target variables is not supported in Snowflake

circle-info

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 Documentationarrow-up-right

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

Thank you for your understanding.

Severity

Medium

Description

In PostgreSQL, it is possible to use a FETCH statementarrow-up-right without INTO to print on the console the values of fetched rows. However, Snowflake requires the FETCH statementarrow-up-right 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