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: Wassili Kazakos <kazakos_at_fzi.de>
Date: 1998/02/03
Message-ID: <34D6CB55.11A35DE9@fzi.de>#1/1

Craig R. McClanahan wrote:
>
> 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.

Hi,
thanks for the hint, but the column is defind as LONG. The problem is not the maximum capacity of the row but that Oracle doesnt accept quoted strings longer than 2000 chars. Maybe this is a parser problem..

The test table is
create table test
(
 id varchar2(20) not null,
 long_value LONG null
);

insert into test (id,long_value) values ('xyz', 'enter 2002 chars here....');

thanks
Wassili

Craig R. McClanahan wrote:
>
> 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
 

-- 
------------------------ - - - - - -  -  -  -  -   -    -    -       
Wassili Kazakos                      e-mail  : kazakos_at_fzi.de
Forschungszentrum Informatik (FZI)   Telefon : (+49) 721 9654 712
Haid-und-Neu-Str. 10-14              Fax     : (+49) 721 9654 709
D-76131 Karlsruhe
Received on Tue Feb 03 1998 - 00:00:00 CST

Original text of this message

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