Nested Table Array Type Definition

This is a translation reference to convert the Oracle Nested Table Array Declaration to Snowflake

circle-info

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 Documentationarrow-up-right

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

Thank you for your understanding.

circle-exclamation
circle-info

This section is for the PL/SQL Version of the Nested Table Arrays, for the Standalone Version please see Nested Table Type Definition.

circle-info

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

Description

In the database, a nested table is a column type that stores an unspecified number of rows in no particular order.

When you retrieve a nested table value from the database into a PL/SQL nested table variable, PL/SQL gives the rows consecutive indexes, starting at 1. Using these indexes, you can access the individual rows of the nested table variable. The syntax is variable_name(index). The indexes and row order of a nested table might not remain stable as you store and retrieve the nested table from the database.

(Oracle PL/SQL Language Reference NESTED TABLESarrow-up-right)

For the translation, the type definition is replaced by an ARRAY Semi-structured Data Typearrow-up-right and then its usages are changed accordingly across any operations. Please note how the translation for Nested Tables and Varrays are the same.

In order to define a Nested Table Array type, the syntax is as follows:

type_definition := TYPE IS TABLE OF datatype;

To declare a variable of this type:

Sample Source Patterns

Nested Table Array definitions

This illustrates how to create different nested table arrays, and how to migrate the definitions for the variables.

Oracle

Snowflake

Nested Table iteration

Oracle

Snowflake

circle-info

Note that a UDF was added to implement the functionality for the update of the element.

This UDF will be added in later revisions.

Known Issues

1. They are currently not being converted

SnowConvert does not support translating these elements.

2. Indexing needs to be modified

Oracle's indexes start at 1, on Snowflake they will begin at 0.

No EWIs related.

Last updated