Error "You have an error in your SQL Syntax" When Using Date Field with ODBC MySQL Connection

Published: 05 Feb 2015
Last Modified Date: 05 Apr 2016


When adding a date field to the view, the following error message might occur:
[MySQL][ODBC 5.3(w) Driver][mysqld-5.6.10]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 'INTEGER) AS


  • Tableau Desktop
  • Generic ODBC Connector
  • MySQL


Option 1

Extract the database.

Option 2

Make a new connection to the database using the native MySQL connection built into Tableau Desktop. Use the Replace Data Source to replace the generic ODBC connection with the native MySQL connection.


The Generic ODBC connector for MySQL does not support the SQL syntax used when querying for date fields.
Did this article resolve the issue?