Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i introduce multiple conditions in LIKE operator for MS Access SQL

I would like to know, if there is any way, how to achieve something like this in access sql.

select * from my_table where column_name like ('ABC%', 'MOP%');

I tried use this: https://stackoverflow.com/a/1387797/1784053 but this seems not to work in Access.

Is there way on how to achieve anything like multiple like conditioning based on dynamic set of conditions? This means, that I cant use OR neither UNION because my set of conditions is dynamic.

Similar question: How can i introduce multiple conditions in LIKE operator

like image 593
Kajiyama Avatar asked Apr 23 '15 05:04

Kajiyama


1 Answers

You can try this:

select * 
from my_table 
where column_name like ('ABC%') or column_name like ('MOP%');
like image 100
Jarvis Stark Avatar answered Nov 15 '22 04:11

Jarvis Stark