On Wed, Sep 12, 2012 at 8:56 PM, fidel_filio <fidel_fi...@yahoo.com> wrote:

> ...
> add hor_uactu varchar(2) default extract(hour from cast('now' as date))
> not null
>
> I get this error:

        Invalid token.
>         SQL error code = -104.
>         Token unknown - line 3, char 34.
>         extract.
>
> Note:
> I am using Firebird 1.5.6


In addition to Helen's comments about using a varchar to hold a number and
using a function in a default value, you're using an ancient version of
Firebird which doesn't support the function EXTRACT at all.  You might be
able to get time by declaring the field to be of type time and assigning
'now' to it.

Do yourself a favor and use a version of Firebird that's less than 10 years
old.

Good luck,

Ann

>


[Non-text portions of this message have been removed]

Reply via email to