From wildcard characters supported by Microsoft Access I cannot get the #
working in SQL statement. A minimalized example:
SELECT COUNT(*) FROM MSysObjects WHERE "123" LIKE "#*"
return value for "#*": 0
return value for "*": 56
It works only in the VBA Immediate Window (I know that the evaluation there is actually different, but anyway):
? "123" LIKE "#*"
True
All other pattern characters seem to work fine. But since the above linked page declares the #
to be usable in SQL statements, is this a bug? Or am I misreading the documentation?
Version info says: Version 1905 (Build 11629.20246 Click-to-Run)
Setting SQL Server Compatible Syntax (ANSI 92)
is off. (In Options > Object Designers.)
UPDATE: A commenter says it works as expected in Access 2010. It also works in Access 2007 and 2016 Pro Plus and in Access Office 365 Business 1906 11727.20230.
I tried changing collation to General (Options > General > New Database Sort Order) and then creating a new database but the issue is still present there.