Using the IN operator and wildcard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I and trying to query a list where one item uses a wildcard Select... WHERE
Project IN ("Title1","Title2*"). Does not seem to work. Is this possible?
 
Nope, you can't use a wild card in with the IN operator. You will have to use an
or clause

WHERE Project = "Title1" OR Project Like "Title2*"
 
DMILLER444 -
Please continue the education on IN and LIKE in MS Access queries.....
Can I do
WHERE partnum IN (LIKE [bill_mat]![mstr_tble])

OR even better...

WHERE partnum IN(LIKE " "*"& [bill_mat] & "*" ");

Trying to get a sub-query to feed strings with wildcards into another query.

HELP from a newbee.........

Clayton
 
Hi,


For the first part of the question, remove the IN.

WHERE partnum LIKE "*" & bill_mat & "*"


I don't understand the second part (and may be not the first one either
-) )



Hoping it may help,
Vanderghast, Access MVP


wcrrun said:
DMILLER444 -
Please continue the education on IN and LIKE in MS Access queries.....
Can I do
WHERE partnum IN (LIKE [bill_mat]![mstr_tble])

OR even better...

WHERE partnum IN(LIKE " "*"& [bill_mat] & "*" ");

Trying to get a sub-query to feed strings with wildcards into another
query.

HELP from a newbee.........

Clayton
 
Back
Top