Home » SQL & PL/SQL » SQL & PL/SQL » Bulk insert (Oracle 10g)
Bulk insert [message #320737] Fri, 16 May 2008 02:34 Go to next message
subbu_tce
Messages: 98
Registered: July 2007
Location: pune
Member
DECLARE
TYPE numType IS TABLE OF NUMBER ;
p_list numType :=numType(1,2,3,4,5);
v_cnt NUMBER;
BEGIN
FORALL j IN p_list.FIRST..p_list.LAST
save EXCEPTIONS
INSERT INTO emp ( empno ) VALUES ( p_list(j) );
EXCEPTION
WHEN OTHERS THEN
v_cnt:=SQL%bulk_exceptions.COUNT;
DBMS_OUTPUT.PUT_LINE(SQLERRM);
END;

empno is number datatype.
While executing the above block am getting "ORA-24381: error(s) in array DML".Why?How to resolve it?
Re: Bulk insert [message #320752 is a reply to message #320737] Fri, 16 May 2008 03:26 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
ORA-24381: error(s) in array DML
 *Cause:  One or more rows failed in the DML.
 *Action: Refer to the error stack in the error handle.

Copy and paste the WHOLE execution.

Also please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: ORA-01427: single row subquery returns more than one row
Next Topic: Table partitioning
Goto Forum:
  


Current Time: Sat Dec 10 06:54:26 CST 2016

Total time taken to generate the page: 0.09807 seconds