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

Home -> Community -> Usenet -> c.d.o.tools -> Re: updating LONG column in Oracle 8

Re: updating LONG column in Oracle 8

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 19 Jul 2001 15:26:57 -0700
Message-ID: <9j7mrh0c8i@drn.newsguy.com>

In article <hKH57.2490$bg6.208548_at_newsread1.prod.itd.earthlink.net>, "ananth says...
>
>Hi: Any information on updating a LONG column in Oracle 8 would be
>appreciated - the LONG itself contains more than 4000 chars so it needs to
>be split up, 'held' in a temp area, concatenated with the final text to be
>updated and then the final update.
>
>Thanks
>
>

first -- you should be using a CLOB, not a long -- lots more functionality and much easier to use then a long. Night and day difference.

Depends on the language. In plsql, upto 32k can be updated this way:

declare

   l_long long;
begin

   select long_column into l_long from t where ...;  

   l_long := l_long || ' more data';

   update t set long_column = l_long where ....; end;

In Pro*C, just Update.

In OCI there are piecewise APIs to access a long.

and so on.

--
Thomas Kyte (tkyte@us.oracle.com)             http://asktom.oracle.com/ 
Expert one on one Oracle, programming techniques and solutions for Oracle.
http://www.amazon.com/exec/obidos/ASIN/1861004826/  
Opinions are mine and do not necessarily reflect those of Oracle Corp 
Received on Thu Jul 19 2001 - 17:26:57 CDT

Original text of this message

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