SQL Language Elements

Transformation for syntax and semantics of PL/SQL language elements.

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Some parts in the output code are omitted for clarity reasons.

Cursor FOR LOOP

You might also be interested in Cursor helper and Cursor declaration.

Oracle

IN -> Oracle_01.sql
--Additional Params: -t JavaScript
CREATE OR REPLACE PROCEDURE PROC1
IS
    MyVariable1 NUMBER;
    MyOtherVariable2 NUMBER := 1;
    CURSOR C1 IS 
        SELECT * FROM Table1 WHERE ID = 123;
    CURSOR C2 (paramCursor1 NUMBER) IS
        SELECT COL1 AS C_1 FROM TABLE1 WHERE ID = paramCursor1;
BEGIN
    FOR myCursorRecord IN C1
        LOOP
            MyVariable1 := myCursorRecord.Col1;
        END LOOP;

    FOR myCursorRecord IN (SELECT * FROM Table1 WHERE ID = MyVariable1)
        LOOP
            MyVariable1 := myCursorRecord.Col1;
        END LOOP;

    <<Block1>>
    FOR myCursorRecord IN C2 (MyOtherVariable2)
        LOOP
            MyVariable1 := myCursorRecord.Col1;
        END LOOP Block1;
END;

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

OPEN, FETCH and CLOSE Statement

You might also be interested in Cursor helper and Cursor declaration.

Oracle

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

SQL Implicit Cursor

Oracle

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

EXIT

You might also be interested in Loop and while statements.

Oracle

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

Execute Immediate

You might also be interested in EXEC helper

Oracle

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

Errors and Exception Handling

You might also be interested in Raise helper

Raise Helper Usage

Oracle

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

When there is not OTHERS handler, SnowConvert uses the "default" case in the switch that throws the original Error Object.

Commit

You might also be interested in EXEC helper

Oracle

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

CASE

Oracle

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

CASE in a variable assignment

Oracle

Snowflake

SnowConvert helpers Code removed from the example. You can find them here.

Call to external C or Java programs

Oracle

Snowflake

Known Issues

No issues were found.

  1. SSC-EWI-0022: One or more identifiers in a specific statement are considered parameters by default.

  2. SSC-EWI-0053: Object may not work.

  3. SSC-EWI-0073: Pending Functional Equivalence Review.

  4. SSC-EWI-OR0052: Exception declaration is handled by the raise function.

  5. SSC-EWI-OR0072: Procedural Member not supported.

  6. SSC-EWI-OR0075: Current of clause is not supported in Snowflake.

  7. SSC-EWI-OR0104: Unusable collection variable.

  8. SSC-FDM-OR0007: Snowflake does not support the versioning of objects. Developers should consider alternate approaches for code versioning.

  9. SSC-FDM-OR0009: SQL IMPLICIT CURSOR VALUES MAY DIFFER.

  10. SSC-FDM-OR0011: The Boolean argument was removed because the "add to stack" options is not supported.

  11. SSC-FDM-OR0012: COMMIT and ROLLBACK statements require adequate setup to perform as intended.

Last updated