Oracle: FORALL SAVE EXCEPTIONS not working
<p>I'm trying to handle a FORALL exceptions with the SAVE EXCEPTIONS clause for the INSERT statement. The process contains two simple tables as per the below;</p>

<pre><code>CREATE TABLE TBL1   
  ("COL1" VARCHAR2(**40** BYTE) NOT NULL);

CREATE TABLE TBL2   
  ("COL1" VARCHAR2(**20** BYTE) NOT NULL);
</code></pre>

<p>The only difference here is the size of a column type. Any attempt made to insert a string value of more than 20 characters would result in handling errors.</p>

<p>Here's the script;</p>

<pre><code>DECLARE  
  TYPE REFCURTYPE IS REF CURSOR;
  REFCUR REFCURTYPE;  

  TYPE ASSARRTYPE IS TABLE OF TBL2%ROWTYPE
    INDEX BY PLS_INTEGER;
  ASSARR ASSARRTYPE;

  DML_ERRORS EXCEPTION;
  PRAGMA EXCEPTION_INIT(DML_ERRORS, -24381);
BEGIN
  OPEN REFCUR FOR
    SELECT
      COL1
    FROM TBL1;

  FETCH REFCUR BULK COLLECT INTO ASSARR; 
  CLOSE REFCUR;

  FORALL i IN ASSARR.FIRST..ASSARR.LAST SAVE EXCEPTIONS
    INSERT INTO TBL2 
      VALUES ASSARR(i);
  COMMIT;
  EXCEPTION
    WHEN DML_ERRORS THEN
      FOR j IN 1..SQL%BULK_EXCEPTIONS.COUNT
      LOOP
        DBMS_OUTPUT.PUT_LINE(SQLERRM(-(SQL%BULK_EXCEPTIONS(j).ERROR_CODE)));

      END LOOP;    
      COMMIT;
END;
</code></pre>

<p>Somehow, when executing the below block for a data set of more than just one record of 20+ chars, I only receive this single error message;</p>

<blockquote>
  <p>"ORA-06502: PL/SQL: numeric or value error: Bulk Bind: Truncated Bind"</p>
</blockquote>

<p>Thanks in advance for any help.</p>