SSC-EWI-OR0136
Current of clause is not supported in Snowflake
Severity
Critical
Description
Some statements like UPDATE and DELETE can use have a CURRENT OF clause inside the WHERE clause, this is not currently supported by Snowflake.
Example Code
Oracle:
CREATE OR REPLACE PROCEDURE proc_update_current_of
AS
CURSOR C1
IS
SELECT * FROM F_EMPLOYEE FOR UPDATE OF SALARY nowait;
BEGIN
FOR CREC IN C1
LOOP
UPDATE F_EMPLOYEE SET SALARY=SALARY+2000 WHERE CURRENT OF C1;
END LOOP;
END;Snowflake Scripting:
Related EWI
SSC-EWI-OR0036: Types resolution issues, the arithmetic operation may not behave correctly between string and date.
SSC-PRF-0004: This statement has usages of cursor for loop.
SSC-EWI-OR0110: For Update Clause is not supported in Snowflake.
Recommendations
Redesign the query to normal
UPDATEorDELETEspecifying the columns in theWHEREclause, consider that if there are duplicate records in the table the query can affect them multiple times.If you need more support, you can email us at [email protected]
Last updated
