Subject Re: [firebird-support] Why Tutorial Examples doesn't works
Author Ivan Cruz
gato2707 wrote:

>Hi everybody.
>
>...Firebird report and error
>104 "invalid token in
>line 2 char 1 in the this code:
>
>CREATE TABLE PROJ_DEPT_BUDGET (
> year INTEGER NOT NULL CHECK (YEAR >= 1993),
> proj_id PROJNO NOT NULL,
> dept_no DEPTNO NOT NULL,
> quart_head_cnt INTEGER [4],
> projected_budget BUDGET,
>
> PRIMARY KEY (year, proj_id, dept_no),
> FOREIGN KEY (dept_no) REFERENCES department (dept_no),
> FOREIGN KEY (proj_id) REFERENCES project (proj_id));
>COMMIT;
>
>
>
>

I believe year is reserved word in Firebird. The error persisted after
you changed to vyear most probably because your forgot changing
the other two ocurrences.

As an alternative you can uses duble-quotes to avoid conflicts with
Firebird parser.

Ivan.