I need help on the SQL statement below:
SELECT * FROM table_name WHERE field_name LIKE ('%bob%','%nancy%','%james%', '%tom%','%elvira%'); _ Any ideas?
SELECT * FROM table_name WHERE field_name LIKE '%bob%' or fieldname like '%nancy%' or fieldname like '%james%' or fieldname like '%tom%' or fieldname like '%elvira%');
What I really want to do is combine "IN" and "LIKE" into a single statement without using "OR".
ANY IDEAS?
you can't...
like looks for matches where a part of the word is given by the variables...
in looks to match a set group of variables