db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: Does derby support still work?
Date Sun, 24 Aug 2008 12:23:28 GMT
Graham Leggett wrote:
> ij> CREATE TABLE active ( active_id INTEGER NOT NULL, serial VARCHAR NOT
> NULL, name VARCHAR NOT NULL, description VARCHAR NOT NULL, signature_id
> INTEGER NOT NULL, PRIMARY KEY(active_id), UNIQUE (serial));
> ERROR 42X01: Syntax error: Encountered "NOT" at line 1, column 66.

I'm not exactly a Derby expert but in this case "serial" seems to be
responsible.

> ij> CREATE TABLE company ( company_id INTEGER NOT NULL, serial VARCHAR
> NOT NULL, name VARCHAR NOT NULL, tradingas VARCHAR, registration_number
> VARCHAR NOT NULL, vat_number VARCHAR, fsp_number VARCHAR, bank_account
> VARCHAR, bank_sortcode VARCHAR, bank_name VARCHAR, bank_swift VARCHAR,
> bank_reference VARCHAR, description VARCHAR, active_id INTEGER NOT NULL,
> contact_id INTEGER NOT NULL, valid_from DATE, valid_to DATE,
> signature_id INTEGER NOT NULL, PRIMARY KEY(company_id), UNIQUE (serial,
> registration_number));
> ERROR 42X01: Syntax error: Encountered "NOT" at line 1, column 68.

Same thing here. My guess: "serial" is a reserved word in Derby. Try to
avoid reserved words as column names.

Bye, Thomas.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message