asked on
ORA-06550: line 34, column 4:
PLS-00436: implementation restriction: cannot reference fields of BULK In-BIND table of records
create table tmp_table1 as select col1, col2, col3, col4, col5, col6 from table1 where 1 = 2;
declare
cursor curOrders is
select
a.col1, a.col2, a.col3, a.col4, a.col5, a.col6
from
table1 a
join
table2 b
on a.col1 = b.col1 and a.col2 = b.col2;
type tbl_bulk is table of curOrders%rowtype;
varOrders tbl_bulk;
begin
open curOrders;
loop
fetch curOrders bulk collect into varOrders limit 500;
forall indx in 1 .. varOrders.count
insert into tmp_table1
(col1, col2, col3, col4, col5, col6)
values
(varOrders(indx).col1, varOrders(indx).col2, varOrders (indx).col3, varOrders(indx).col4, varOrders(indx).col5, varOrders(indx).col6);
exit when curOrders%notfound;
--exit when varClaims.count < 500; which is better?
end loop;
close curOrders;
commit;
end;
/
ASKER
Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.
TRUSTED BY
ASKER