You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Marc Lustig <ma...@marclustig.com> on 2002/12/12 17:58:47 UTC

torque-created sql not accepted

Hi,
I have this xml:

	<table name="ARTIKELBESCHREIBUNG">
		<column name="ARTIKELBESCHREIBUNG_ID" primaryKey="true" required="true"
type="INTEGER"/>
		<column name="DESC" required="true" type="VARCHAR" size="255"/>
	</table>

and get that error when executing torque:insert-sql

    [torque-sql-exec] [ERROR] Failed to execute: CREATE TABLE
ARTIKELBESCHREIBUNG ( ARTIKELBESCHREIB
UNG_ID INTEGER NOT NULL, DESC VARCHAR (255) NOT NULL, PRIMARY
KEY(ARTIKELBESCHREIBUNG_ID) )
    [torque-sql-exec] [ERROR] java.sql.SQLException: Syntax error or access
violation: You have an e
rror in your SQL syntax near 'DESC VARCHAR (255) NOT NULL, PRIMARY
KEY(ARTIKELBESCHREIBUNG_ID) )' at
 line 1



What's wrong here? Any idea?

Greetings,
Marc


AW: torque-created sql not accepted

Posted by Marc Lustig <ma...@marclustig.com>.
Thanks Heiko, I was suspicious about that already...



> -----Ursprüngliche Nachricht-----
> Von: Heiko Stehli [mailto:heiko.stehli@hm-informatik.de]
> Gesendet: Donnerstag, 12. Dezember 2002 18:28
> An: Turbine Torque Users List
> Betreff: AW: torque-created sql not accepted
>
>
> Hello,
>
> the problem is the column name "DESC". This is a SQL key word and can't be
> used as column name.
>
> Regards
>
> Heiko
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Marc Lustig [mailto:mail@marclustig.com]
> Gesendet: Donnerstag, 12. Dezember 2002 17:59
> An: torque-user
> Betreff: torque-created sql not accepted
>
>
> Hi,
> I have this xml:
>
> 	<table name="ARTIKELBESCHREIBUNG">
> 		<column name="ARTIKELBESCHREIBUNG_ID"
> primaryKey="true" required="true"
> type="INTEGER"/>
> 		<column name="DESC" required="true" type="VARCHAR"
> size="255"/>
> 	</table>
>
> and get that error when executing torque:insert-sql
>
>     [torque-sql-exec] [ERROR] Failed to execute: CREATE TABLE
> ARTIKELBESCHREIBUNG ( ARTIKELBESCHREIB
> UNG_ID INTEGER NOT NULL, DESC VARCHAR (255) NOT NULL, PRIMARY
> KEY(ARTIKELBESCHREIBUNG_ID) )
>     [torque-sql-exec] [ERROR] java.sql.SQLException: Syntax error
> or access
> violation: You have an e
> rror in your SQL syntax near 'DESC VARCHAR (255) NOT NULL, PRIMARY
> KEY(ARTIKELBESCHREIBUNG_ID) )' at
>  line 1
>
>
>
> What's wrong here? Any idea?
>
> Greetings,
> Marc
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


AW: torque-created sql not accepted

Posted by Heiko Stehli <he...@hm-informatik.de>.
Hello,

the problem is the column name "DESC". This is a SQL key word and can't be
used as column name.

Regards

Heiko



-----Ursprüngliche Nachricht-----
Von: Marc Lustig [mailto:mail@marclustig.com]
Gesendet: Donnerstag, 12. Dezember 2002 17:59
An: torque-user
Betreff: torque-created sql not accepted


Hi,
I have this xml:

	<table name="ARTIKELBESCHREIBUNG">
		<column name="ARTIKELBESCHREIBUNG_ID" primaryKey="true" required="true"
type="INTEGER"/>
		<column name="DESC" required="true" type="VARCHAR" size="255"/>
	</table>

and get that error when executing torque:insert-sql

    [torque-sql-exec] [ERROR] Failed to execute: CREATE TABLE
ARTIKELBESCHREIBUNG ( ARTIKELBESCHREIB
UNG_ID INTEGER NOT NULL, DESC VARCHAR (255) NOT NULL, PRIMARY
KEY(ARTIKELBESCHREIBUNG_ID) )
    [torque-sql-exec] [ERROR] java.sql.SQLException: Syntax error or access
violation: You have an e
rror in your SQL syntax near 'DESC VARCHAR (255) NOT NULL, PRIMARY
KEY(ARTIKELBESCHREIBUNG_ID) )' at
 line 1



What's wrong here? Any idea?

Greetings,
Marc


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>