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: David Barbour <dbarbour_at_connectsouth.com>
Date: Wed, 17 Jan 2001 10:32:10 -0600
Message-Id: <10744.126895@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_01C080A3.09E76C80
Content-Type: text/plain;

        charset="iso-8859-1"

Thanks Jacques - worked like a charm. Interestingly, whether it was an octal, decimal, hex or ascii dump, the referenced character still wasn't in the handy list I have from "The C Programmer's Handbook" from AT&T Bell Laboratories. Some of this data was loaded via sqlldr from flat files created by Excel spreadsheets and I wonder if Microsoft has their own set of unprintable characters!  

Anyway, thanks to all that responded - there were 147,000+ rows affected, it's fixed, and the developers think I'm some sort of genius.  

David A. Barbour
Oracle DBA - ConnectSouth
512-681-9438
dbarbour_at_connectsouth.com

-----Original Message-----
From: Jacques Kilchoer [mailto:Jacques.Kilchoer_at_quest.com] Sent: Tuesday, January 16, 2001 7:40 PM
To: Multiple recipients of list ORACLE-L Subject: RE: Phantom characters

> -----Original Message-----
> From: David Barbour [ mailto:dbarbour_at_connectsouth.com
<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 <http://www.quest.com>

------_=_NextPart_001_01C080A3.09E76C80
Content-Type: text/html;

        charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>RE: Phantom characters</TITLE>

<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=433032416-17012001><FONT face=Arial color=#0000ff size=2>Thanks Jacques - worked like a charm.&nbsp; Interestingly, whether it was an octal, decimal, hex or ascii dump, the referenced character still wasn't in the handy list I have from "The C Programmer's Handbook" from AT&amp;T Bell Laboratories.&nbsp; Some of this data was loaded via sqlldr from flat files created by Excel spreadsheets and I wonder if Microsoft has their own set of unprintable characters!&nbsp; </FONT></SPAN></DIV> <DIV><SPAN class=433032416-17012001><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=433032416-17012001><FONT face=Arial color=#0000ff size=2>Anyway, thanks to all that responded - there were 147,000+ rows affected, it's fixed, and the developers think I'm some sort of genius.</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<P><FONT face=Arial size=2>David A. Barbour</FONT> <BR><FONT face=Arial
size=2>Oracle DBA - ConnectSouth</FONT> <BR><FONT face=Arial 
size=2>512-681-9438</FONT> <BR><FONT face=Arial 
size=2>dbarbour_at_connectsouth.com</FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">   <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma   size=2>-----Original Message-----<BR><B>From:</B> Jacques Kilchoer   [mailto:Jacques.Kilchoer_at_quest.com]<BR><B>Sent:</B> Tuesday, January 16, 2001   7:40 PM<BR><B>To:</B> Multiple recipients of list ORACLE-L<BR><B>Subject:</B>   RE: Phantom characters<BR><BR></FONT></DIV>   <P><FONT size=2>&gt; -----Original Message-----</FONT> <BR><FONT size=2>&gt;   From: David Barbour [<A
  href="mailto:dbarbour_at_connectsouth.com">mailto:dbarbour_at_connectsouth.com</A>]</FONT>   <BR><FONT size=2>&gt; Sent: mardi, 16. janvier 2001 16:45</FONT> <BR><FONT   size=2>&gt; </FONT><BR><FONT size=2>&gt; I've got some entries in one of my   columns that appear to </FONT><BR><FONT size=2>&gt; contain a leading</FONT>   <BR><FONT size=2>&gt; space or spaces.&nbsp; When I try to use ltrim, they   don't go </FONT><BR><FONT size=2>&gt; away.&nbsp; If I spool</FONT> <BR><FONT   size=2>&gt; the data, I find these spaces are actually represented in the   </FONT><BR><FONT size=2>&gt; spool file as</FONT> <BR><FONT size=2>&gt;   /240.&nbsp; I don't have this number as an ascii, decimal or octal   </FONT><BR><FONT size=2>&gt; representation</FONT> <BR><FONT size=2>&gt; of   anything, and am at a loss as to how to identify and remove these</FONT>   <BR><FONT size=2>&gt; "phantoms".</FONT> </P>   <P><FONT size=2>Try "dump" to get the value to supply to the chr function   (will probably be 240), then use the ltrim function.</FONT> </P>
  <P><FONT size=2>e.g.</FONT> </P>
  <P><FONT size=2>SQL&gt; select dump ('xxxMy name') from dual ;</FONT> </P>
  <P><FONT size=2>DUMP('XXXMYNAME')</FONT> <BR><FONT 
  size=2>---------------------------------------------------</FONT> <BR><FONT 
  size=2>Typ=96 Len=10: 120,120,120,77,121,32,110,97,109,101</FONT> </P>   <P><FONT size=2>SQL&gt; select ltrim ('xxxMy Name', chr (120)) from dual   ;</FONT> </P>
  <P><FONT size=2>LTRIM('</FONT> <BR><FONT size=2>-------</FONT> <BR><FONT   size=2>My Name</FONT> </P>
  <P><FONT size=2>------</FONT> <BR><FONT size=2>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=2></FONT> <BR><FONT size=2>Jacques R. Kilchoer</FONT> <BR><FONT 
  size=2>(949) 754-8816</FONT> <BR><FONT size=2>Quest Software, Inc.</FONT> 
  <BR><FONT size=2>8001 Irvine Center Drive</FONT> <BR><FONT size=2>Irvine,   California 92618</FONT> <BR><FONT size=2>U.S.A.</FONT> <BR><FONT size=2><A   target=_blank href="http://www.quest.com">http://www.quest.com</A></FONT> Received on Wed Jan 17 2001 - 10:32:10 CST

Original text of this message

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