Link to home
Start Free TrialLog in
Avatar of chaitu chaitu
chaitu chaituFlag for India

asked on

ORA-01461: can bind a LONG value only for insert into a LONG column

Hi,

I have a column called PATH which is a data type of VARCHAR2(4000 BYTE) where we are storing very big string.It seems now the string is exceeded 4000 characters for one record.so we are getting below error.

"ORA-01461: can bind a LONG value only for insert into a LONG column"

Is it correct way to increase the length of the column from 4000 to 40000.Do we need to delete the data for the table before altering the datatype size?

ALTER TABLE automation_entries MODIFY (PATH VARHCAR2(40000 BYTE));
Avatar of sarabande
sarabande
Flag of Luxembourg image

Is it correct way to increase the length of the column from 4000 to 40000.
no, 4000 is the maximum for varchar2.

use a blob or clob for longer texts.

Sara
Avatar of chaitu chaitu

ASKER

Do we need to delete the data for the table before altering the datatype size?

to alter the datatype from VARHCHAR2(40000 BYTE) to blob or clob.Do we need to delete all data in that table?
ASKER CERTIFIED SOLUTION
Avatar of sarabande
sarabande
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
note, it has been some time ago when i worked with blobs. but i think it is still true that you can't easily search for texts in a blob or clob. if that is necessary, you normally would add a table which contains tags and is related to the current table. then you can search for tags using the second table.

Sara