Re: Does derby support still work?

Thomas Vandahl <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.torque.user
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.