Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: LONG to long in Oracle?
As you might assume (because you got the same error in SQL*Plus), this restriction comes from Oracle, not Java or JDBC. Oracle restricts the length of a VARCHAR2 column to a maximum of 2000 characters. If you want more than that, use a LONG column (or one of the other variants if you want to store binary data) instead.
Wassili Kazakos wrote:
> Hi,
>
> I'm trying to store a long text (grater than 2000 chars) in an Oracle
> DB, but I get the message ORA-01704 String literal to long. The
> explanation is "quoted strings may not contain more than 2000
> characters". Does this make sense? Is there an other possibility to
> store long text files in a LONG field? Or have I to cut it in 2000 CHAR
> pieces?
>
> I try to do this from an java application, but I get the same error with
> sqlplus...
>
> thanks in advance
> Wassili
Received on Mon Feb 02 1998 - 00:00:00 CST