BEGIN
OPEN DQC_Cursor1 ; 
LOOP
FETCH DQC_Cursor1 INTO @table_name1 ; 
EXIT when DQC_Cursor1%notfound;
EXEC Incorporate @table_name = @table_name1,
    @historical_table_name = Replace(
        @table_name1,
        'Temp',
        'Historical'
    ) ;
END EXEC;
END LOOP;
CLOSE DQC_Cursor1;
commit;
END;
我得到的错误信息如下。我在 ; 附近也得到了不正确的语法,当我将鼠标悬停在带下划线的错误上时,期待对话。我已经写出了包含的存储过程。有人知道这里出了什么问题吗?
Incorrect syntax near 'LOOP'.
Incorrect syntax near the keyword 'EXIT'.