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.

Convert Array To Table

User_D54REMay 29 2017 — edited May 29 2017

Scenario:

     - I have 2 types:

          create or replace TYPE T_STRING_TABLE AS TABLE OF VARCHAR2(32767);

          create or replace TYPE T_STRING_TABLE_2D AS TABLE OF T_STRING_TABLE;

     - In PLSQL, I have a variable with T_STRING_TABLE_2D as the datatype and it is already populated.

               v_file_arr                       T_STRING_TABLE_2D;

Question:

     1. How can I convert this two-dimensional array into a table for me to be able to INSERT those data into a table.

          INSERT in tbl_sample(

               col1, col2, ...

          )

          SELECT v_file_arr FROM dual;

          (something like this)

P.S.

I tried to research it by myself, unfortunately, I think I lack the skill in googling this topic.

Answers as links is fine with me, I can do the reading by myself (but an example code would be greatly appreciated)

Additional Note: It is for an APEX application but unfortunately,

the csv file being uploaded have more than 50 columns,

so the available plugin excel2collections is not feasible.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 26 2017
Added on May 29 2017
5 comments
8,326 views