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: Replacing control chars

RE: Replacing control chars

From: Deshpande, Kirti <kirti.deshpande_at_verizon.com>
Date: Sat, 04 Jan 2003 00:03:37 -0800
Message-ID: <F001.00527071.20030104000337@fatcity.com>


Sure it did. :)
I had forwarded both responses to the developers. There were no more questions.  

-----Original Message-----
Sent: Friday, January 03, 2003 4:14 PM
To: Multiple recipients of list ORACLE-L

didn't my script do the same thing ??

Raj



Rajendra Jamadagni MIS, ESPN Inc. Rajendra dot Jamadagni at ESPN dot com
Any opinion expressed here is personal and doesn't reflect that of ESPN Inc. QOTD: Any clod can have facts, but having an opinion is an art!

-----Original Message-----
Sent: Friday, January 03, 2003 2:04 PM
To: Multiple recipients of list ORACLE-L

Thanks Connor.
I think this might do it..

-----Original Message-----
Sent: Friday, January 03, 2003 12:04 PM To: Multiple recipients of list ORACLE-L

>From AskTom

ops$tkyte_at_8i> create or replace package body utils   2 as
  3
  4 g_bad_chars varchar2(256);
  5 g_a_bad_char varchar2(256);
  6
  7 function strip_bad( p_string in varchar2 ) return varchar2
  8 is
  9 begin

 10      return replace( 
 11                 translate( p_string, 
 12                            g_bad_chars, 
 13                            g_a_bad_char ), 
 14                 substr( g_a_bad_char, 1, 1 ), 
 15                 '' ); 

 16 end;
 17
 18
 19
 20 begin
 21      for i in 0..255 loop 
 22          if ( i not between ascii('a') and 
ascii('z') AND 
 23               i not between ascii('A') and 
ascii('Z') AND 
 24               i not between ascii('0') and 
ascii('9') ) 
 25          then 
 26              g_bad_chars := g_bad_chars || chr(i); 
 27          end if; 
 28      end loop; 
 29      g_a_bad_char := rpad( 
 30                        substr(g_bad_chars,1,1), 
 31                        length(g_bad_chars), 
 32                        substr(g_bad_chars,1,1)); 
 33 end;
 34 /

Package body created.

ops$tkyte_at_8i> select
  2 utils.strip_bad( 'How is this?' ) ,   3 dump( utils.strip_bad( 'How is this?' ) )   4 from dual;

UTILS.STRIP_BAD('HOWISTHIS?')




DUMP(UTILS.STRIP_BAD('HOWISTHIS?'))


Howisthis
Typ=1 Len=9: 72,111,119,105,115,116,104,105,115
Connor McDonald
http://www.oracledba.co.uk
http://www.oaktable.net

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, and...he will sit in a boat and drink beer all day"



Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net 
-- 
Author: =?iso-8859-1?q?Connor=20McDonald?= 
  INET: hamcdc_at_yahoo.co.uk 

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com 
San Diego, California        -- Mailing list and web hosting services 
--------------------------------------------------------------------- 
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). 



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net 
-- 
Author: Deshpande, Kirti 
  INET: kirti.deshpande_at_verizon.com 

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com 
San Diego, California        -- Mailing list and web hosting services 
--------------------------------------------------------------------- 
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). 



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Deshpande, Kirti
  INET: kirti.deshpande_at_verizon.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Sat Jan 04 2003 - 02:03:37 CST

Original text of this message

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