Subject | Re: [firebird-support] Problems with default values... |
---|---|
Author | Ann Harrison |
Post date | 2012-09-13T13:17:50Z |
On Wed, Sep 12, 2012 at 8:56 PM, fidel_filio <fidel_filio@...> wrote:
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
> ...Invalid token.
> add hor_uactu varchar(2) default extract(hour from cast('now' as date))
> not null
>
> I get this error:
> SQL error code = -104.In addition to Helen's comments about using a varchar to hold a number and
> Token unknown - line 3, char 34.
> extract.
>
> Note:
> I am using Firebird 1.5.6
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]