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!

Query that returns multiple wildcard criteria using Like and In

821611Dec 6 2010 — edited Dec 7 2010
Hi there, trying to do something like this:

Select * from tablename
Where columnname Like '5%' or Like '8%' or Like '12%'

without using OR...so basically this:

Selet * from tablename
Where columnname Like IN ('5%', '8%', '12%')

In MS Sql, i can do something like this:

SELECT * from tablename t
Where exists(Select val FROM dbo.fn_String_To_Table('25,05', ',', 0)
ata WHERE columname LIKE val + '%' )

Where dbo.fn_String_To_Table converts the string array to a table.

Any suggestions?

Thanks much.
This post has been answered by Solomon Yakobson on Dec 7 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2011
Added on Dec 6 2010
12 comments
8,717 views