Home » SQL & PL/SQL » SQL & PL/SQL » ORA-01461: can bind a LONG value only for insert into a LONG column without using LONG values (Oracle9i Release 9.2.0.7.0 - 64bit Production)
ORA-01461: can bind a LONG value only for insert into a LONG column without using LONG values [message #448462] Tue, 23 March 2010 09:58
bestbefore00
Messages: 9
Registered: September 2009
Junior Member
Hi ,
I'm getting this error, even if I don't use LONG values.
I have 2 tables with same structure Table1 and Table2 and a collection defined as follows:

TYPE TYPE_T   IS TABLE OF Table1 %ROWTYPE;
Collection_1            TYPE_T;

Table2 is defined as temporary.

create global temporary table Table2
(......)
on commit preserve rows;


Some records from Table1 are inserted into Collection_1 and then inserted into Table2 as follows:

FORALL I IN 1 .. Collection_1.COUNT
   INSERT INTO Table2 VALUES Collection_1 (I);


Sometimes I get the error ORA-01461: can bind a LONG value only for insert into a LONG column, but when I rerun the same procedure on the same records, everything is OK. It only happened 2 times and I can't reproduce the situation. Although, the collection has the same records, I only get the error when trying to insert in the second table.
The tables have the following columns:

DATE	not	null,
NUMBER	not	null,
NUMBER	not	null,
NUMBER(10)	not	null,
NUMBER(10)	not	null,
NUMBER(10)	not	null,
NUMBER(10)	not	null,
NUMBER(10)	not	null,
NUMBER(10)	not	null,
NUMBER(17,4)	not	null,
NUMBER(17,4)	not	null,
DATE	not	null,
NUMBER(5)	not	null,
NUMBER(10)	not	null,
VARCHAR2(25),		
VARCHAR2(25),		
VARCHAR2(25),		
VARCHAR2(15),		
VARCHAR2(25),		
VARCHAR2(25),		
VARCHAR2(25),		
NUMBER(5),		
VARCHAR2(25),		
NUMBER(5),		
NUMBER(5),		
VARCHAR2(25),		
NUMBER(15,2),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10),		
NUMBER(10),		
VARCHAR2(25),		
VARCHAR2(25),		
VARCHAR2(25),		
NUMBER(10,3),		
VARCHAR2(15),		
VARCHAR2(15),		
VARCHAR2(1),		
VARCHAR2(15),		
VARCHAR2(15),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(20,10),		
NUMBER(10),		
VARCHAR2(1),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(15,2),		
VARCHAR2(1),		
DATE,		
VARCHAR2(1),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(15,5),		
VARCHAR2(25),		
NUMBER,		
VARCHAR2(20),		
VARCHAR2(30),		
NUMBER,		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
VARCHAR2(12),		
VARCHAR2(12),		
VARCHAR2(1),		
VARCHAR2(45),		
VARCHAR2(100),		
VARCHAR2(100),		
VARCHAR2(100),		
VARCHAR2(100),		
DATE,		
VARCHAR2(1),		
DATE,		
VARCHAR2(1),		
VARCHAR2(1),		
VARCHAR2(1),		
VARCHAR2(1),		
VARCHAR2(20),		
VARCHAR2(1),		
VARCHAR2(4),		
VARCHAR2(4),		
VARCHAR2(8),		
VARCHAR2(1),		
NUMBER(4),		
VARCHAR2(30),		
VARCHAR2(10),		
NUMBER(10),		
DATE,		
VARCHAR2(30),		
VARCHAR2(30),		
VARCHAR2(30),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
NUMBER(10),		
VARCHAR2(40),		
VARCHAR2(64),		
VARCHAR2(64),		
VARCHAR2(38),		
NUMBER(10),		
NUMBER(15,2),		
NUMBER(10)		

Please help,
Thanks

Adriana

[Updated on: Wed, 24 March 2010 02:18]

Report message to a moderator

Previous Topic: Split varchar field into 2 fields ,SQL
Next Topic: how to build a query to retrieve the records in between the dates with same field?
Goto Forum:
  


Current Time: Fri Dec 09 06:13:25 CST 2016

Total time taken to generate the page: 0.25857 seconds