My SQL queries sometimes work, sometimes don’t work
If certain types of SQL queries fail the problem might be in the type of database implementation that is employed. Not all database drivers through ODBC support the full range of SQL query types – please see the documentation for your particular type of database driver to learn if the query you are attempting to use is supported.
Access and MSSQL should provide this documentation when installed (use the help file), MySQL has an online resource for this: