I have a stored procedure which receives three string parameters
1. p_ReqIDs VARCHAR2
2. p_ItemIDs VARCHAR2
3. p_Qtys VARCHAR2
The above 3
i did like this :) short and sweet.
create or replace procedure proc1(p_ReqID varchar2,p_ItemID varchar2,p_ItemQty varchar2)
is
begin
insert into test(req_id,item_id,itemqty)
select regexp_substr(req_id,'[^;]+',1,level),
regexp_substr(item_id,'[^;]+',1,level),
regexp_substr(item_qty,'[^;]+',1,level)
from (
select p_ReqID Req_ID,p_ItemID item_id,p_ItemQty item_qty
from dual
)
connect by regexp_substr(req_id,'[^;]+',1,level) is not null;
end;