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: Strange Data issue.....

RE: Strange Data issue.....

From: Denham Eva <EvaD_at_TFMC.co.za>
Date: Thu, 22 Aug 2002 22:53:20 -0800
Message-ID: <F001.004BDE88.20020822225320@fatcity.com>


Tim,  

Thanks for this, as it turns out there was extra characters in the column. After alittle investigation I discovered that the data was migrated from an excel spreadsheet using ODBC. I suspect that this "original" data is the problem. Anyway once that was discovered it was easy enough to fix. Once again many thanks.  

And thank you to all who gave suggestions. Regards
Denham

-----Original Message-----
Sent: Friday, August 23, 2002 5:38 AM
To: Multiple recipients of list ORACLE-L

Converting to ASCII using the "ASCII()" function will not do any good. Try the DUMP() function on the columns:

select
race||'('||dump(race)||'),'||gender||'('||dump(gender)||'),'||count(*) from pers
group by race||'('||dump(race)||'),'||gender||'('||dump(gender)||')';

...I'll bet DUMP(GENDER) shows a different length with extra characters for some rows...

Denham,  

Your "group by" does not match what you are selecting, thus the results are wrong.  

Change your query as follows:  

   select race||','||gender,count(*)

        from pers 
        group by race||','||gender

Hope this helps.  

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Thursday, August 22, 2002 8:59 AM
To: Multiple recipients of list ORACLE-L

Hello Gurus,

I have a problem which I hope someone can help me with. I am trying to clean up some data on a table. This table happens to be a personnel table.
In this table there are two columns RACE and GENDER. The select used is :

   select race||','||gender||','||count(*)

        from pers 
        group by race, gender; 

The result is as follows:
A,F,62 
A,M,613 
A,M,35 
A,,15 
C,F,34 
C,M,198 
C,M,4 
C,,2 
I,F,13 
I,M,69 
I,M,1 
W,F,205 
W,M,972 
W,M,28 
W,,15 

The problem is that the result returns double Ms, M indicating Male. As highligthed above
I have tried converting to ascii to see if they are different in anyway but both Ms return ascii 77.
Does anyone have any thoughts on this?

TIA
Denham Eva
Oracle DBA
In UNIX Land
On a quiet Night, you can hear the Windows machines reboot.


DISCLAIMER This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. TFMC, its holding company, and any of its subsidiaries each reserve the right to monitor and manage all e-mail communications through its networks.

Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be views of any such entity.



This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal - For more information please visit <http://www.marshalsoftware.com> www.marshalsoftware.com




DISCLAIMER
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. TFMC, its holding company, and any of its subsidiaries each reserve the right to monitor and manage all e-mail communications through its networks.

Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.




This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal

For more information please visit www.marshalsoftware.com


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Denham Eva
  INET: EvaD_at_TFMC.co.za

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Aug 23 2002 - 01:53:20 CDT

Original text of this message

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