Re: RE: Finding Special Characters in Oracle Column
"Rich Jesse" <[email protected]>
| Newsgroups | gmane.comp.db.oracle.toad.free |
|---|---|
| Message-ID | <[email protected]> |
Shiva writes:
> This does not work for me too.
> I have Toad 9.7.2.5 and oracle 10g DB.
> select 1 FROM DUAL where regexp_like ('ABC'||chr(9)||'DEF','[\t~*>]');
True -- "\t" is not defined in the regexp for Oracle.
> However, this trick works ( Thanks to Nate Schroeder )
> select 1 FROM DUAL where regexp_like
> ('ABC'||chr(9)||'DEF','['||chr(9)||'~*>]');
I'm always a fan of escaping special characters, in this case, the tilde,
star, and greater-than. Also, if you want to catch more than just the tab,
it's considered a "control" character, so this should work for most newer
versions of Oracle (tested on 10.1):
select 1 FROM DUAL
where regexp_like ('ABC'||chr(9)||'DEF','[\~\*\>[[:cntrl:]]');
Beware that you could also have other "funky" characters, which may or may
not be desirable, like CHR(14844061), if you have a multi-byte DB.
HTH! GL!
Rich -- [TeamT]
Disclaimer: No mo Ochocinco
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/toad/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/toad/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/