开发者

Wildcards in MS Access SQL

开发者 https://www.devze.com 2023-01-12 12:54 出处:网络
I\'ve written this SQL query in MS Access: SELECT * FROM Students WHERE namelike \'_a*\' Which produces no r开发者_运维问答esults, even though I have names like danny and sara in the Students table

I've written this SQL query in MS Access:

SELECT *
FROM Students
WHERE name  like '_a*'

Which produces no r开发者_运维问答esults, 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消