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 use rowtype in FORALL

KaziSep 23 2007 — edited Sep 23 2007
hi guru!

how to use rowtype in the following FORALL Syntex

CREATE OR REPLACE PROCEDURE prc_type(p_accession varchar2)
IS
type tseq is table of ma_structsetup.seq_no%type
index by binary_integer;
pseq tseq;

type tchild is table of ma_structsetup.child_id%type
index by binary_integer;
pchild tchild;

cursor cur is
select seq_no,child_id
from ma_structsetup;

BEGIN

open cur;
loop
fetch cur bulk collect into pseq,pchild;

forall i in pseq.first..pseq.last
insert into ma_structresult(seq_no,child_id)
values (pseq(i),pchild(i));

exit when cur%notfound;
end loop;
close cur;
commit;
END;
/

here i declared type for each column of cursor. how can i do it by using rowtype

Thanks in advance
Mokarem
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2007
Added on Sep 23 2007
1 comment
779 views