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: Carriage Return

Re: Carriage Return

From: Lothar Armbruester <lothar.armbruester_at_t-online.de>
Date: Tue, 4 Dec 2001 18:00:54 +0100
Message-ID: <PM0003944D70B08539@hades.none.local>


Allan Martin wrote:
> Hi,
>
> Does anyone know how to insert a Carriage Return into a field with a
> datatype of LONG.
>
> I was working along the lines of:
>
> update tblname set longfield = longfield || chr(13) || 'my new line'
> where
> pk = 'Martin';
> commit;
>

Hi Allan,
you can use PL/SQL to achieve this:

declare
l varchar2(2000);
begin

   select longfield into l from tblname where pk='Martin';    l := l||chr(13)||'my new line';
   update tblname set longfield=l where pk='Martin'; end;

Since LONG fields are quite unflexible, you might have a look on CLOBs in the manuals.

Hope that helps,
Lothar

-- 
Lothar Armbrüster       | la_at_oktagramm.de
Hauptstr. 26            | la_at_heptagramm.de
D-65346 Eltville        | lothar.armbruester_at_t-online.de
Received on Tue Dec 04 2001 - 11:00:54 CST

Original text of this message

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