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: Phantom characters

RE: Phantom characters

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Tue, 16 Jan 2001 17:40:38 -0800
Message-Id: <10743.126848@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_01C08026.7E67AC50
Content-Type: text/plain;

        charset="iso-8859-1"

> -----Original Message-----
> From: David Barbour [mailto:dbarbour_at_connectsouth.com]
> Sent: mardi, 16. janvier 2001 16:45
>
> I've got some entries in one of my columns that appear to
> contain a leading
> space or spaces. When I try to use ltrim, they don't go
> away. If I spool
> the data, I find these spaces are actually represented in the
> spool file as
> /240. I don't have this number as an ascii, decimal or octal
> representation
> of anything, and am at a loss as to how to identify and remove these
> "phantoms".

Try "dump" to get the value to supply to the chr function (will probably be 240), then use the ltrim function.

e.g.

SQL> select dump ('xxxMy name') from dual ;

DUMP('XXXMYNAME')



Typ=96 Len=10: 120,120,120,77,121,32,110,97,109,101

SQL> select ltrim ('xxxMy Name', chr (120)) from dual ;

LTRIM('



My Name

any ignorant comments made are the sole responsibility of J. R. Kilchoer and should not reflect adversely upon my employer.  

Jacques R. Kilchoer
(949) 754-8816
Quest Software, Inc.
8001 Irvine Center Drive
Irvine, California 92618
U.S.A.
http://www.quest.com

------_=_NextPart_001_01C08026.7E67AC50
Content-Type: text/html;

        charset="iso-8859-1"
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=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2652.35">
<TITLE>RE: Phantom characters</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>&gt; -----Original Message-----</FONT> <BR><FONT SIZE=3D2>&gt; From: David Barbour [<A = HREF=3D"mailto:dbarbour_at_connectsouth.com">mailto:dbarbour_at_connectsouth.c= om</A>]</FONT>

<BR><FONT SIZE=3D2>&gt; Sent: mardi, 16. janvier 2001 16:45</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; I've got some entries in one of my columns that =
appear to </FONT>
<BR><FONT SIZE=3D2>&gt; contain a leading</FONT> <BR><FONT SIZE=3D2>&gt; space or spaces.&nbsp; When I try to use ltrim, = they don't go </FONT>
<BR><FONT SIZE=3D2>&gt; away.&nbsp; If I spool</FONT> <BR><FONT SIZE=3D2>&gt; the data, I find these spaces are actually = represented in the </FONT>
<BR><FONT SIZE=3D2>&gt; spool file as</FONT> <BR><FONT SIZE=3D2>&gt; /240.&nbsp; I don't have this number as an = ascii, decimal or octal </FONT>
<BR><FONT SIZE=3D2>&gt; representation</FONT> <BR><FONT SIZE=3D2>&gt; of anything, and am at a loss as to how to = identify and remove these</FONT>
<BR><FONT SIZE=3D2>&gt; &quot;phantoms&quot;.</FONT> </P>

<P><FONT SIZE=3D2>Try &quot;dump&quot; to get the value to supply to = the chr function (will probably be 240), then use the ltrim = function.</FONT>
</P>

<P><FONT SIZE=3D2>e.g.</FONT>
</P>

<P><FONT SIZE=3D2>SQL&gt; select dump ('xxxMy name') from dual ;</FONT> </P>

<P><FONT SIZE=3D2>DUMP('XXXMYNAME')</FONT> <BR><FONT =

SIZE=3D2>---------------------------------------------------</FONT>
<BR><FONT SIZE=3D2>Typ=3D96 Len=3D10: =
120,120,120,77,121,32,110,97,109,101</FONT> </P>

<P><FONT SIZE=3D2>SQL&gt; select ltrim ('xxxMy Name', chr (120)) from = dual ;</FONT>
</P>

<P><FONT SIZE=3D2>LTRIM('</FONT>
<BR><FONT SIZE=3D2>-------</FONT>
<BR><FONT SIZE=3D2>My Name</FONT>
</P>

<P><FONT SIZE=3D2>------</FONT>
<BR><FONT SIZE=3D2>any ignorant comments made are the sole = responsibility of J. R. Kilchoer and should not reflect adversely upon = my employer.</FONT></P>

<P><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>Jacques R. Kilchoer</FONT>
<BR><FONT SIZE=3D2>(949) 754-8816</FONT>
<BR><FONT SIZE=3D2>Quest Software, Inc.</FONT>
<BR><FONT SIZE=3D2>8001 Irvine Center Drive</FONT>
<BR><FONT SIZE=3D2>Irvine, California 92618</FONT>
<BR><FONT SIZE=3D2>U.S.A.</FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.quest.com" =
Received on Tue Jan 16 2001 - 19:40:38 CST

Original text of this message

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