I am having an issue trying to filter by a field that has a trailing underscore. This is fairly common in our scenario. The error generated is:
SELECT * FROM LOTS WHERE LOTS_ = '24'
OleDbException was unhandled: Syntax error in query expression '[LOTS]_='1''.
In the above scenario, LOTS_ is the name of the field. I tried to "escape" the underscore by using two _'s but this did not resolve the issue. What is recommended to work around?
I also tried the following query which did not error but did not return any results either. Other columns work as expected.
SELECT * FROM LOTS WHERE "LOTS_" = '24'