Kbase P98157: Syntax error (7587) when running an SQL Statement from MS Query
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  21/03/2007 |
|
Status: Verified
FACT(s) (Environment):
Windows
Progress 9.1X
OpenEdge 10.X
SYMPTOM(s):
Syntax error (7587) when running a SELECT SQL Statement
Syntax error at or about (statement excerpt). (10713)
Syntax error in SQL statement at or about date, ..." (10713)
One of the fields being selected has a name of "TYPE" or "DATE"
Using Microsoft Query or EXCEL
Connecting to the Database via ODBC
Same error occurs when delimiting the column named "TYPE" with double quotation marks
CAUSE:
The words "TYPE", "DATE" are reserved keywords of the Microsoft Access or the Microsoft Jet database engine. Query syntax errors are generated when using the Microsoft Query if either a table name or a field name is a reserved keyword.
FIX:
There are three possible solutions:
1. Use a different ODBC client.
2. Change the name of the offending field or table.
3. Create a view against the offending table and execute the query against that view.