How do I resolve the error "(HY000) [Microsoft][ODBC Excel Driver] Syntax error in query. Incomplete query clause"?
This error will usually occur when you are incorrectly using DB Tester to perform an SQL statement against a Microsoft Excel Sheet. Below is an example of a standard DB_Execute statement which would be run against an Excel spreadsheet:
hSQL = DB_ExecuteSQL (hDB, "SELECT * FROM `Sheet1$` `Sheet1$`")
Make sure that when you reference the Excel sheet name, that you are enclosing the name in `apostrophes`, and not in "single quotes" because this will result in the error above.
`Sheet1$` will work"Sheet1$" will generate error