COMPOUND STATEMENTS
This section is a translation specification for the compound statements
Last updated
This section is a translation specification for the compound statements
Last updated
This section is a work in progress, information may change in the future.
The basic unit of a PL/SQL source program is the block, which groups related declarations and statements.
A PL/SQL block is defined by the keywords DECLARE, BEGIN, EXCEPTION, and END. These keywords divide the block into a declarative part, an executable part, and an exception-handling part. Only the executable part is required. ()
The BEGIN...END
block in Oracle can have the following characteristics:
Be nested.
Contain the DECLARE statement for variables.
Group multiple SQL or PL/SQL statements.
When calling a procedure or user-defined function (UDF), generating code is needed to support the equivalence as call_results
variable. In this case, is used to print the information.
When calling a procedure or user-defined function (UDF), generating code is needed to support the equivalence as call_results
variable. In this case, is used to print the information.
Notice that in Oracle, the block BEGIN...END
should use the EXECUTE IMMEDIATE
statement to run alter session
statements.
The following warning may be added in the future:
/*** MSC-WARNING - MSCEWI3058 - NLS_DATE_FORMAT SESSION PARAMETER DOES NOT ENFORCE THE INPUT FORMAT IN ORACLE ***/
When calling a procedure or user-defined function (UDF), generating code is needed to support the equivalence as call_results
variable. In this case, is used to print the information.
When calling a procedure or user-defined function (UDF), generating code is needed to support the equivalence as call_results
variable. In this case, is used to print the information.
When calling a procedure or user-defined function (UDF), generating code is needed to support the equivalence as call_results
variable. In this case, is used to print the information.
ZERO_DIVIDE
exception in Snowflake is not supported.
Exceptions that use GOTO statements may be affected too.
Cursor functionality may be adapted under current restrictions on translations.
SSC-EWI-0027:The following statement uses a variable/literal with an invalid query and it will not be executed.
SSC-FDM-OR0035: DBMS_OUTPUT.PUTLINE check UDF implementation.
In Snowflake, a BEGIN/END block can be the top-level construct inside an anonymous block ().
Review the following documentation about IF statements to learn more: and
Review the user-defined function (UDF) used .
For more information, review the following documentation: and
Review the user-defined function (UDF) used .
For more information review the following documentation: and Snowflake and .
Anonymous block in Oracle may have calls to procedures. Furthermore, the following documentation may be useful: .
The following example uses the OUT parameters, the information about the current transformation can be found here:
For more information, review the following documentation: .
The following example displays the usage of a cursor
inside a BEGIN...END
block. Review the following documentation to learn more: .
Review the user-defined function (UDF) used .
For more information review the following documentation: .
Review the user-defined function (UDF) used .
For more information review the following documentation: .
Review the user-defined function (UDF) used .
Unsupported GOTO statements in Oracle. Review this .
: Types resolution issues, the arithmetic operation may not behave correctly between string and date.
: Number type column may not behave similarly in Snowflake.
: This statement has usages of cursor for loop.