MySQL Forums
Forum List  »  Connector/ODBC

"SELECT COUNT(*) FROM" Syntax error
Posted by: Joachim Zetterman
Date: November 06, 2017 10:27AM

Hi!

Im trying to connect to a MySQL db using a ODBC connector via a program called ExtendSim.

I find the following error in my temp file:

-- Query logging
--
-- Driver name: MySQL ODBC 5.3 Driver Version: 05.03.0009
-- Timestamp: 171106 17:03:18

1509984198:SELECT TABLE_NAME, TABLE_COMMENT, TABLE_TYPE, TABLE_SCHEMA FROM ( SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE() AND ( TABLE_TYPE='BASE TABLE' OR TABLE_TYPE='VIEW' ) ) TABLES ;

1509984198:SELECT COUNT(*) FROM ;

1509984198:Using direct execution;

1509984198:query has been executed;

1509984198:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1;

Im assuming that the issue revolves around there being no following syntax after "FROM" in the second query. But i do not know why that is since it's ODBC in-built querys.

Any guidance how to interpret and fix this is highly appreciated!

Options: ReplyQuote


Subject
Written By
Posted
"SELECT COUNT(*) FROM" Syntax error
November 06, 2017 10:27AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.