brettanderson77
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
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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
WHERE colname LIKE '%a%' or colname LIKE '%b%'