Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How populate a nested table of recursive type?

CavazosMAug 6 2017 — edited Aug 7 2017

     Hi,

I have a database project with a hierarchy table and I wish I could replicate my table with a custom data type, but I've been having trouble...

I've been trying of different ways, especially with the bulk collect but with not successful results.

Here an example of my types definition:

CREATE OR REPLACE TYPE element_type;

/

CREATE OR REPLACE TYPE element_table IS TABLE OF REF element_type;

/

CREATE OR REPLACE TYPE element_type AS OBJECT (

    id       NUMBER(5),

    name     VARCHAR2(5 CHAR),

    childs   element_table

) NOT FINAL;

/

Anybody knows if its there a way of populate my  "NESTED TABLE OF REF " type in a SELECT statement?

Thanks in advance!

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 4 2017
Added on Aug 6 2017
4 comments
709 views