Re: Creating a Table of a Type which contains a nested table

From: Dereck L. Dietz <dietzdl_at_ameritech.net>
Date: Sun, 8 Feb 2009 19:31:00 -0500
Message-ID: <cNKjl.13317$as4.558_at_nlpi069.nbdc.sbc.com>


"hpuxrac" <johnbhurley_at_sbcglobal.net> wrote in message news:5400e817-335b-4bca-808e-5d3a2849a2ea_at_p36g2000prp.googlegroups.com... On Feb 8, 5:21 pm, "Dereck L. Dietz" <diet..._at_ameritech.net> wrote:
> Oracle 10.2.0.3
> Windows Server 2003
>
> Example 1 with VARRAY:
>
> CREATE OR REPLACE TYPE t_test AS OBJECT
> (
> field1 VARCHAR2(10),
> array1 t_array_va,
> array2 t_array_va
> );
>
> CREATE OR REPLACE TYPE t_test_tab AS TABLE OF t_test;
> /
>
> Example 2 with NESTED TABLES:
>
> CREATE OR REPLACE TYPE t_test AS OBJECT
> (
> field1 VARCHAR2(10),
> array1 t_array_nt,
> array2 t_array_nt
> );
>
> CREATE OR REPLACE TYPE t_test_tab AS TABLE OF t_test;
> /
>
> I've seen example 1 syntax in Oracle documentation but not for example 2.
> Is the syntax for example 2 correct?

Are you getting an error message?

Syntax and documentation are available on ( among other places ) tahiti.oracle.com ...

I've been TRYING to look all weekend but nothing comes up. Can somebody just please answer my question and help me out?

I want to use a structure in a pipeline function that I will have to define a type of and the base structure will be a table with one or two columns which are defined as a nested table. I can get the VARRAY to work but can't figure out how to do it with Nested Tables. Received on Sun Feb 08 2009 - 18:31:00 CST

Original text of this message