Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Replacing control chars
Kirti,
if the input is going to be HTML, then I have no clue how you'd do it, but if it is just a varchar2 then something like following might help ...
SELECT REPLACE( UPPER(:my_str)
,REPLACE( TRANSLATE( UPPER(:my_str) ,'123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' ,'-----------------------------------' ) ,'-' ) )
It gets more complicated for mixed case queries. Raj
QOTD: Any clod can have facts, but having an opinion is an art!
-----Original Message-----
Sent: Friday, January 03, 2003 12:09 PM
To: Multiple recipients of list ORACLE-L
Hello Listers,
I was asked if there is any procedure that could be called from a trigger
to replace (with a blank) or remove all non-printable characters from the
text before inserting it in the target table? The incoming data is from a
Web interface and may contain underline, bold, blink, NL characters. Target
column should get characters 0-9, A-Z and a-z. The data should not be
rejected.
I suggested use of 'replace', but was asked if I had anything already
written to do this. And I have not.
Done anyone have anything to share?
Thanks.
- Kirti
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jamadagni, Rajendra INET: Rajendra.Jamadagni_at_espn.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 Fri Jan 03 2003 - 12:04:14 CST
- text/plain attachment: ESPN_Disclaimer.txt
![]() |
![]() |