How to run cursor in snowflake?
问题 I have written below cursor in SQL and working file. But I am not able to run the same cursor on snowflake, please help. DECLARE @CurrentMonth NVARCHAR(100) DECLARE @CurrentMonth1 NVARCHAR(100) DECLARE MYDateCURSOR CURSOR DYNAMIC FOR SELECT Collections_COE FROM [CollectionsAgeing_OTCN024_028_029] OPEN MYDateCURSOR FETCH LAST FROM MYDateCURSOR INTO @CurrentMonth CLOSE MYDateCURSOR DEALLOCATE MYDateCURSOR --select value from STRING_SPLIT(@CurrentMonth,'-') ; select @CurrentMonth1=LEFT(