Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: replace CR LF in spaces or blanks
Try:
select translate (Field, chr(10)||chr(13), ' ') from tab;
That's translate CR ans LF into blanks.
You can also eliminate them with:
select translate (Field, 'a'||chr(10)||chr(13), 'a') from tab;
or replace CRLF with one blank:
select translate (Field, chr(10)||chr(13), ' ') from tab;
(chr(10) is replaced by a blank and chr(13) is ignored.
Bernhard Powolny a écrit dans le message
<7qfsp0$bib$1_at_fleetstreet.Austria.EU.net>...
>Hi everybody
>
>
>May somebody can help me:
>
>
>I have in a character field somewhere Carriage returns and Linefields
> Hex : 0D 0A );
>
>
>If I spool this field out by SQL on unixplatform as a flat file i got
>somewehere carriage returns .
>
>Exemple :
>
>Field CHAR(150)
>
>frisör Gabi
>Labit
>
>Hex interpetation :
>47 61 62 0D 0A 4C 61 and so on
>
>
>
>Q: How can i replace this characters into a blanks or other characters in
>SQL ?
> (yes i can do on unix by perlprogramming too but this is not the
>Question)
>
>The only anwser i got from oracle suport is to use the dump feature but
>there you only get the interpration from the characterfiel as for example
>Hec 0d 0a as 47,61,62,69,d,a,4c,61,62
>
>
>Hope for an answer
>
>b.powolny_at_mobilkom.at
>
>
>
>
>
>
>
>
Received on Tue Aug 31 1999 - 02:50:10 CDT
![]() |
![]() |