View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
MH[_2_] MH[_2_] is offline
external usenet poster
 
Posts: 52
Default SQL Syntax Error

You have missed out the underscore on the first line:

SELECT CMT_REGISTER_TRANSACTION.Bank_Account,

MH

"Cheryl" wrote in message
...
I am querying an external database and get a syntax error message that
looks
like:

SELECT CMT REGISTER_TRANSACTION.Bank_Account,
CMT_REGISTER_TRANSACTION.Check<<???, etc, etc.
FROM CMT_REGISTER_TRANSACTION CMT_REGISTER_TRANSACTION
WHERE (CMT_REGISTER_TRANSACTION.Bank_Account='4001')
Syntax Error.

The problem seems to be the "check" field because if I remove it, the data
is retrieved. Have checked the ODBC connections and also confirmed if
there
are custom descriptions for the "check" field. Everything seems to be in
order. Have also tried querying other tables in the external database &
have
no problems. Wondering what could be causing Excel to return a syntax
error
message on this field.

Thanks,
Cheryl