Link to home
Start Free TrialLog in
Avatar of brettanderson77
brettanderson77Flag for Australia

asked on

Using IN and LIKE Operator together Oracle SQL %

Hi,

I have a text list to use with IN operator - IN ('a','b') yet i need to compare it to a field that might contain the value of a;b so i want to put wild cards in the IN list??? Doesn't seem to work - ie:

WHERE IN ('%a%' ,  '%b%')

Any other way to achieve this without importing text files to table etc?

Cheers,
Brett
Avatar of Milleniumaire
Milleniumaire
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you tried the LIKE operator:

WHERE colname LIKE '%a%' or colname LIKE '%b%'
Avatar of brettanderson77

ASKER

Hi,
Problem is it isn't in a table, its values i've copied into a list (a,b etc) from XL.
Hence why i'm trying to use IN ()
Cheers,
Brett
ASKER CERTIFIED SOLUTION
Avatar of Milleniumaire
Milleniumaire
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial