So, I asked the same question on the Office Dev Center forum and learned how to do a Pass-Through query to "bypass" Access' attempt to optimize my query. Rather than repeating it all here, here is the link:
Microsoft Access 2010 LIKE clause character range (e.g., "[a-z]"]) not working
-
18-06-2023 - |
Question
I am developing a custom ODBC driver to which I link using external ODBC data source from Microsoft Access 2010. I issue the following query:
SELECT column_name from table_name where column_name like '[S-T]%';
Access seems to cut off the WHERE clause before submitting it to the ODBC driver manager. When I enable tracing through the ODBC Data Source Administrator, the log shows
SELECT column_name FROM table_name
When I remove the '[S-T]', the query works fine. Also, the same query causing trouble in Access works fine when I run it under ODBC Test (MDAC 2.8 testing tool).
Any idea why Access might be doing this?
Solution 2
OTHER TIPS
The Wildcard symbol for Access is the asterisks.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow