SSC-FDM-OR0022

For Loop With Multiple Conditions Is Currently Not Supported By Snowflake Scripting. Only First Condition Is Used

This FDM is deprecated, please refer to SSC-EWI-OR0100 documentation.

Description

Oracle allows multiple conditions in a single FOR LOOP however, Snowflake Scripting only allows one condition per FOR LOOP. Only the first condition is migrated and the others are ignored during transformation.

Example Code

Input Code:

CREATE OR REPLACE PROCEDURE P3
AS
BEGIN
FOR i IN REVERSE 1..3,
REVERSE i+5..i+7
LOOP
    NULL;
END LOOP; 
END;

Output Code:

CREATE OR REPLACE PROCEDURE P3 ()
RETURNS VARCHAR
LANGUAGE SQL
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'
EXECUTE AS CALLER
AS
$$
    BEGIN
        --** SSC-FDM-OR0022 - FOR LOOP WITH MULTIPLE CONDITIONS IS CURRENTLY NOT SUPPORTED BY SNOWFLAKE SCRIPTING **
        FOR i IN REVERSE 1 TO 3 LOOP
            NULL;
        END LOOP;
    END;
$$;

Recommendations

Last updated