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

Home -> Community -> Usenet -> c.d.o.server -> Re: Inserting into a Long Datatype

Re: Inserting into a Long Datatype

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 17 Jul 1998 15:12:47 GMT
Message-ID: <35b1696c.2469671@192.86.155.100>


A copy of this was sent to "Daniel Clamage" <dclamageNOSPAM_at_telerama.com> (if that email address didn't require changing) On 17 Jul 1998 00:31:53 -0400, you wrote:

>I'm working on a PL/SQL stored procedure to update a LONG column with up to
>a 2GB string. When it's done I'll put it on my web site. Probably a week or
>so to finish it.
>--

More likely forever.

You cannot do that in pl/sql alone. With a CLOB or BLOB in Oracle8 -- yes, it is easy. With a LONG or LONG RAW in any version, it is physically impossible.

You can piecewise READ a LONG with pl/sql using dbms_sql but you cannot piecewise insert/update it, nor do you have any piecewise access to LONG RAWS...

You must use C or some other 3gl (or a 4gl that eventually calls C to do it for you)

>- Dan Clamage
>http://www.telerama.com/~dclamage
>If you haven't crashed the Server,
>you haven't been trying hard enough.
>
>Thomas Kyte <tkyte_at_us.oracle.com> wrote in article
><35b47ba1.29141793_at_192.86.155.100>...
>> >I am trying to insert text into a Long datatype, but I get this error.
>> >ORA-01704: string literal too long
>> One method in SQL plus and other tools that can run plsql that works upto
>32k is
>> The pl/sql variable can be initialized to upto 32k of static text. It
>can then
>> be inserted into the table (it is a bind variable, not a constant at that
>> point).
>> So, that put a 24,726 character string into the table...
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Jul 17 1998 - 10:12:47 CDT

Original text of this message

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