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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Oracle REPLACE function and carriage returns

RE: Oracle REPLACE function and carriage returns

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Wed, 19 Mar 2003 14:05:59 -0800
Message-Id: <24715.322448@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

------_=_NextPart_001_01C2EE63.B93AD9D0
Content-Type: text/plain

Have you tried a "select dump (field1) from table1" to see what ascii code corresponds to what you think is a carriage return?

> -----Original Message-----
> From: Hopper, Wendy S [mailto:wendy.hopper_at_eds.com]
> > 
> I am trying to write a query that strips carriage returns 
> from a comment
> field while selecting the data to a file.   I have used the following
> command -
> 
> select replace( field1, chr(10), '*' ) from table1;
> 
> The query seems to remove the carriage returns when returning 
> the data via
> sqlplus, but when I spool the output to a file it still shows 
> ^m followed by
> * in it.  Any ideas on what is going on here?

------_=_NextPart_001_01C2EE63.B93AD9D0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.45">
<TITLE>RE: Oracle REPLACE function and carriage returns</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Have you tried a &quot;select dump (field1) from =
table1&quot; to see what ascii code corresponds to what you think is a = carriage return?</FONT></P>

<P><FONT SIZE=3D2>&gt; -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>&gt; From: Hopper, Wendy S [<A =
HREF=3D"mailto:wendy.hopper_at_eds.com">mailto:wendy.hopper_at_eds.com</A>]</F=

ONT>

<BR><FONT SIZE=3D2>&gt; &gt; </FONT>
<BR><FONT SIZE=3D2>&gt; I am trying to write a query that strips =
carriage returns </FONT>
<BR><FONT SIZE=3D2>&gt; from a comment</FONT>
<BR><FONT SIZE=3D2>&gt; field while selecting the data to a =
file.&nbsp;&nbsp; I have used the following</FONT>
<BR><FONT SIZE=3D2>&gt; command -</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; select replace( field1, chr(10), '*' ) from =
table1;</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; The query seems to remove the carriage returns =
when returning </FONT>
<BR><FONT SIZE=3D2>&gt; the data via</FONT>
<BR><FONT SIZE=3D2>&gt; sqlplus, but when I spool the output to a file =
it still shows </FONT>
<BR><FONT SIZE=3D2>&gt; ^m followed by</FONT>
<BR><FONT SIZE=3D2>&gt; * in it.&nbsp; Any ideas on what is going on =
here?</FONT>
</P>
Received on Wed Mar 19 2003 - 16:05:59 CST

Original text of this message

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