Re: SQL error 1064 when saving with mysql 4.0
Posted by: Mark Matthews
Date: February 09, 2005 08:28AM

Julien Craan wrote:
> Hello there,
> Doesn't anyone knows why I am getting this error,
> I am using the last driver to connect to
> mysql.(mysql-connector-java-3.1.6-bin).
>
> tks
>
> __________________________________________________
> _______________________
>
>
> java.sql.SQLException: 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 'convert,
> transactionform.cam_custservice_notes as
> cam_custservice_notes, transac' at line 1
[snip]

Julien,

'convert' is a SQL keyword can't be used 'bare' as a column or alias name (i.e. it needs to be surrounded by backticks). Is this a query you're passing through by hand, or is hibernate generating it? If hibernate is generating it (usually it uses smaller aliases that don't use words), then you'll have to fix hibernate, otherwise you'll have to fix your hand-crafted query to use either a different alias or backtick-quote the alias.

-Mark

Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html

Options: ReplyQuote


Subject
Written By
Posted
Re: SQL error 1064 when saving with mysql 4.0
February 09, 2005 08:28AM


Sorry, you can't reply to this topic. It has been closed.

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.