apresto
asked on
Using LIKE in an IN clause - SQL
Hi guys/Gals
Is it possible to use a LIKE clause within an IN clause of an SQL statement, for example:
...WHERE somefield IN (Like '%LTD%', Like '%PLC%')
any idea's for using this in SQL server?
Is it possible to use a LIKE clause within an IN clause of an SQL statement, for example:
...WHERE somefield IN (Like '%LTD%', Like '%PLC%')
any idea's for using this in SQL server?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not that I know of
ASKER
ok cool, cheers
Im gonna leave the question open for abit incase someone else knows of a way (doubltful), but why not :o)
thanks again
Im gonna leave the question open for abit incase someone else knows of a way (doubltful), but why not :o)
thanks again
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks guys, I didnt think it was possible, but i just went with OR's in the end
Thanks for your contributions
Apresto
Thanks for your contributions
Apresto
Glad to be of assistance.
Huji
Huji
ASKER
yeh, i tried 'like' but i wondered if it was possible to use a Like withing an IN, or is that a job for CASE?
Is there any other way to do what im trying to other than straight likes?