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!

how can send data to dbms_sql.varchar2_table parameter in procedure

user222Feb 14 2019 — edited Feb 14 2019

Dear All

I have like this scenario

create table test_Data (name varchar2(500));

-- procedure

CREATE OR REPLACE PROCEDURE test_array(

    p IN  dbms_sql.varchar2_table  )

AS

BEGIN

  FOR i IN p.FIRST .. p.LAST

  LOOP

       insert into test_Data values(p(i));

     END LOOP;

  commit;

END test_array;

/

I need to call test_array procedure by a simple way like this

begin

test_array('a','b','c','d');

end;

thanks in advance

This post has been answered by Manik on Feb 14 2019
Jump to Answer
Comments
Post Details
Added on Feb 14 2019
4 comments
644 views