Knowledgebase
[QODBC-Desktop] Troubleshooting: Expected lexical element not found
Posted by Rajendra Dewani (QODBC Support) on 31 October 2012 11:51 AM
|
|
Troubleshooting: Expected lexical element not foundProblem DescriptionWhen trying to execute a query statement I get the error message " Expected lexical element not found " SolutionsIt seems to be the issue in the SQL Statement. Please check all the fields name and table names. Normally this could be a typo error in the field name in your SQL Statement. To know more about the fields and data layout, please Click Here Another Possible Problem & Solution:Problem Description:When I issue SQL statement: SELECT Desc FROM Charge I get "Expected lexical element not found: = <identifier>" However, if I issue Select * from Charge Then, I get a full output, with one of the columns named "Desc". Why can't I query for the column by name? I have tried this through the VB demo and through a C# program as well. Solution:I would like to inform you that Desc may be a reserved word in SQL due to this you are getting this error. I kindly request you to please put quotes around "Desc". Please use below query which does not issue an error:
SELECT "Desc" FROM Charge
| |
|
Comments (2)
Ricky Bowman
12 February 2018 05:31 PM
I get the same error message when running a query in Microsoft Query against the customer table in quickbooks. I modified the query to only select one column and still get the same error. My query is: select listid as id from customer.
Jack
13 February 2018 01:36 PM
Hi Ricky,
Please use below query & check again:
select listid as “id” from customer
If you are still the facing issue, Please raise a support ticket to the QODBC Technical Support department from below mentioned link & provide requested information:
http://support.flexquarters.com/esupport/index.php?/Tickets/Submit
We may need the following information, Please attach below listed files when replying to the ticket.
1) Screenshot of QODBC Setup Screen -- > About
2) Screenshot of the issue you’re facing.
Share Entire Log Files as an attachment in text format from
3) QODBC Setup Screen -- > Messages -- > Review QODBC Messages
4) QODBC Setup Screen -- > Messages -- > Review SDK Messages
Refer: How to take screenshot: www.qodbc.com/links/screenshot.htm
Please use below query & check again:
select listid as “id” from customer
If you are still the facing issue, Please raise a support ticket to the QODBC Technical Support department from below mentioned link & provide requested information:
http://support.flexquarters.com/esupport/index.php?/Tickets/Submit
We may need the following information, Please attach below listed files when replying to the ticket.
1) Screenshot of QODBC Setup Screen -- > About
2) Screenshot of the issue you’re facing.
Share Entire Log Files as an attachment in text format from
3) QODBC Setup Screen -- > Messages -- > Review QODBC Messages
4) QODBC Setup Screen -- > Messages -- > Review SDK Messages
Refer: How to take screenshot: www.qodbc.com/links/screenshot.htm