OPEN CURSOR
Description
Before you can use a cursor to retrieve rows, it must be opened. (Redshift SQL Language Reference Open Cursor).
This syntax is fully supported in Snowflake.
Grammar Syntax
Sample Source Patterns
Setup data
Redshift
Snowflake
Open cursor without arguments
Input Code:
IN -> Redshift_01.sql
Output Code:
OUT -> Redshift_01.sql
Open cursor with arguments
Cursor arguments have to be binded per each one of its uses, SnowConvert will generate the bindings, was well as reorder and repeat the passed values to the OPEN statement as needed to satisfy the bindings.
Redshift
IN -> Redshift_02.sql
Snowflake
OUT -> Redshift_02.sql
Open cursor with procedure parameters or local variables
The procedure parameters or local variables have to be binded per each one of its uses in the cursor query, SnowConvert will generate the bindings and add the parameter or variable names to the OPEN statement, even if the cursor originally had no parameters.
Redshift
IN -> Redshift_03.sql
Snowflake
OUT -> Redshift_03.sql
Known Issues
There are no known issues.
Related EWIs.
There are no related EWIs.
Last updated