Meir
Meir

Reputation: 12785

Wildcards in MS Access SQL

I've written this SQL query in MS Access:

SELECT *
FROM Students
WHERE name  like '_a*'

Which produces no results, even though I have names like danny and sara in the Students table. THe '_' wildcard doesn't seem to work.

BTW,

like '*a*' 

does return all names with a in them.

And ideas?

Upvotes: 1

Views: 1566

Answers (1)

mavnn
mavnn

Reputation: 9479

In Access query builder's dialect of sql, you need ? not _. If you connect to the same mdb backend via odbc you'll need to go back to using the standard wildcards.

See this page for details.

Upvotes: 2

Related Questions