Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Filter LIKE ANY

ysriJan 8 2013 — edited Jan 8 2013
Hi, I want to rewrite this sql filter condition:
where col1 like '%a' or col1 like 'b%' or col1 like '%c%' or col1 like 'd'

into more simpler format like the way Teradata allows:
where col1 like any ('%a','b%','%c%','d')

What's the equivalent syntax in Oracle? Can REGEXP_LIKE be used?
Any working example please?

Similarly, simpler format for:
where col1 not like '%a' and col1 not like 'b%' and col1 not like '%c%' and col1 not like 'd'


Thanks,
-srinivas y.
This post has been answered by Solomon Yakobson on Jan 8 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2013
Added on Jan 8 2013
6 comments
1,085 views