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 to Insert Multiple rows (sent as a array) using a Stored Procedure

708932Jun 25 2009 — edited Jun 25 2009
Hello,

Need to insert multiple rows at a time using a Stored Procedure.

The Front End will be Calling the SP by passing a input parameter which is a Varchar.
The input parameter has multiple rows with delimiters.

example:

create table Employee (ID integer,name varchar2,salary integer)

varvalue := '1,raj,2000|2,ramu,3000|3,ravi,4000'

Need to split this array and insert rows into the above table.

',' -> Column Delimiter
'|' -> Row Delimiter


select * from Employee

Output:

1 raj 2000
2 ramu 3000
3 ravi 4000



Thanks in Advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2009
Added on Jun 25 2009
3 comments
1,316 views