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'
,'-----------------------------------'
)
,'-'
)
)
FROM DUAL
/
It gets more complicated for mixed case queries.
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-----
From: Deshpande, Kirti [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 03, 2003 12:09 PM
To: Multiple recipients of list ORACLE-L
Subject: Replacing control chars
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
********************************************************************This e-mail message is confidential, intended only for the named recipient(s) above and may contain information that is privileged, attorney work product or exempt from disclosure under applicable law. If you have received this message in error, or are not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 and delete this e-mail message from your computer, Thank you.*********************************************************************2
