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: Inserting long data

Re: Inserting long data

From: <Marc.Fleischeuers_at_kub.no-spam.nl>
Date: 1997/11/04
Message-ID: <ura8xqcp5.fsf@kub.nl>#1/1

"Joseph S. Testa" <jtesta_at_scioto.net> writes:

> David P. Baker wrote:
>
> > Hi. We're running into a problem that must have been solved already: we're
> > trying to insert data into a LONG column, and we're getting "ORA-01704: string
> > literal too long". According to the book, a string literal can have no more
> > than 2,000 characters.
> >
> > Is there any way to get around this, except by splitting up the string and
> > concatenating the (< 2,000 chars) pieces?
>
> How about up to 32K using pl/sql and a pl/sql variable that is defined as
> varchar2(32760). the only problem is you still cant do the > 2K input string from
> keyboard.

There's still an 'insert' that you have to perform, and this insert is subjected to the 2000-char limit. Concatenation cannot be done with an insert; updating a LONG through concentenation is out because concatenation of LONGs is out. I've been banging my head on this for a while; if there's anything I missed I'd certainly love to hear. (incidentally: cutting up the LONG column in *fetching* is possible in pl/sql with Oracle 7.3)

The bottom line AFAIK is that it cannot be done in Oracle 7 with (pl/)sql. Your options are: import/export, Java, Pro*[language of choice], OCI, or Oracle 8.

HTH -
Marc Received on Tue Nov 04 1997 - 00:00:00 CST

Original text of this message

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