View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Wim[_2_] Wim[_2_] is offline
external usenet poster
 
Posts: 8
Default SQL query syntax

Your IN statement is very nice. I tried it, but unfortunately it only
works for exact strings.

I would like to have something like:

SELECT ... FROM ... WHERE Name IN ('*An*' ,'John') and Age=26

so not only An but also Ann will be chosen


I tried already this one:

SELECT ... FROM ... WHERE Name Like "An" And Age=26 Or Name Like "John"
and
Age=26

This works, but

SELECT ... FROM ... WHERE (Name Like "An" Or Name Like "John") and
Age=26

doesnt' work