Some parts of the output code are omitted for clarity reasons.
Description
Snowflake Scripting Cursors are non-scrollable. Currently, only FETCH NEXT is supported.
Code Example
Input Code:
IN -> SqlServer_01.sql
CREATEORALTERPROCEDURE scrollablecursorTestASBEGIN-- Should be marked with SSC-EWI-TS0037DECLARE CursorVar CURSORSCROLLSTATICREAD_ONLYFORSELECT FirstNameFROM vEmployee;-- Should not be markedDECLARE CursorVar2 CURSORSTATICREAD_ONLYFORSELECT FirstNameFROM vEmployee;DECLARE CursorVar3 CURSORFORWARD_ONLYSTATICREAD_ONLYFORSELECT FirstNameFROM vEmployee;RETURN'DONE';END;
Output Code:
OUT -> SqlServer_01.sql
CREATEORREPLACEPROCEDURE scrollablecursorTest ()RETURNSVARCHARLANGUAGESQLCOMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"transact"}}'
EXECUTEASCALLERAS$$DECLARE-- Should be marked with SSC-EWI-TS0037 !!!RESOLVE EWI!!! /*** SSC-EWI-TS0037 - SNOWFLAKE SCRIPTING CURSORS ARE NON-SCROLLABLE, ONLY FETCH NEXT IS SUPPORTED ***/!!!
CursorVar CURSORFORSELECT FirstNameFROM vEmployee;-- Should not be marked CursorVar2 CURSORFORSELECT FirstNameFROM vEmployee; CursorVar3 CURSORFORSELECT FirstNameFROM vEmployee;BEGINRETURN'DONE';END;$$;