ORA-01461 Exception During Bulk Insert

165 views Asked by At
FOR i IN 1..t_label.COUNT LOOP

t_label(i).is_new        := 'Y';
t_label(i).modified_date := SYSDATE;

--<-- Work around for bulk insert error

INSERT INTO fabric_label_last
VALUES t_label(i);

-->

END LOOP;

-- Causes ORA-01461 exception

--FORALL i IN 1..t_label.COUNT SAVE EXCEPTIONS
--INSERT INTO fabric_label_last
--VALUES t_label(i);

The per-record insert works, but if I try to use the bulk insert I get an ORA-01461 exception.

Following are the column definitions for the table:

VENDOR_CODE    VARCHAR2(4 BYTE)               NOT NULL,
OPTION_VALUE   VARCHAR2(8 BYTE)               NOT NULL,
OPTION_TYPE    VARCHAR2(3 BYTE)               NOT NULL,
GRADE          VARCHAR2(30 BYTE),
FABRIC_TYPE    VARCHAR2(5 BYTE),
DESCRIPTION    VARCHAR2(40 BYTE),
RACK_ID        VARCHAR2(5 BYTE),
IS_NEW         VARCHAR2(1 BYTE)               NOT NULL,
IS_DROPPED     VARCHAR2(1 BYTE)               NOT NULL,
MODIFIED_DATE  DATE                           NOT NULL

"t_label" is an associative array of rowtype fabric_label_last.

0

There are 0 answers