Is there an easy way to combine LIKE and IN in one statement in SQL Server, without using a lot of AND and OR?
e.g. I know in MySQL you can do it this way:
SELECT * FROM table1 WHERE column1 REGEXP 'value1|value2|value3'
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not really.
There is no alternation operator in the
LIKEpattern syntax. If on 2008 you can useYou can also use Regular Expressions in SQL Server but not natively. You need to enable CLR and install an assembly for this.