Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: LONG to long in Oracle?

Re: LONG to long in Oracle?

From: Craig R. McClanahan <cmcclanahan_at_mytown.net>
Date: 1998/02/02
Message-ID: <34D63268.1BFA235B@mytown.net>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US