PL/SQL Append_Values Hint gives error message
You get this error because every your INSERT executes as a separate DML statement. Oracle prevents read/write on the table where data were added using direct path insert until commit.Technically you can use PL/SQL collections and FORALL instead:
SQL> declare 2 type array_t is table of number index by pls_integer; 3 a_t array_t; 4 begin 5 for i in 1..100 loop 6 a_t(i) := i; 7 end loop; 8 forall i in 1..100 9 insert /*+ append_values */ into t values (a_t(i)); 10 end; 11 /
But the question Justin asked is in action - where are your data coming from and why can't you use usual INSERT /*+ append */ INTO ... SELECT FROM approach ?