SQL Language Elements

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

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

  1. SSC-OOS:

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

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

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

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

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

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

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

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

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

Last updated