Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Carriage Return
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.deReceived on Tue Dec 04 2001 - 11:00:54 CST
![]() |
![]() |