Subject | Re: [firebird-support] Cannot alter calculated field. |
---|---|
Author | Martijn Tonies |
Post date | 2005-05-18T18:35:33Z |
Hello Ranando,
catch is that "alter" doesn't seem to like "computed by" fields. It seems
that the only way to change this field's definition is to drop it and
re-create it. The difficulty there is that this field is used in a View
which is itself used by a lot of other objects in the database. So I cannot
drop this field without dropping and re-creating a lot of stuff. Is there
any way around this? Is there any plans on allowing "Computed By" fields to
be "Alter"ed"?
update, it allows you to "alter" computed by fields.
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
> I have a field in a table defined asassumed is because of how floating point numbers are cast into integers. The
>
> "Age" Computed By (Cast(((Cast('today' as Date) - "DOB")/365.25) as Int))
>
> I would like to alter it as follows:
>
> alter "Age" Type Computed By ((Cast('today' as Date) - "DOB")*4/1461)
>
> The first method keeps giving rounding errors on the result which I
catch is that "alter" doesn't seem to like "computed by" fields. It seems
that the only way to change this field's definition is to drop it and
re-create it. The difficulty there is that this field is used in a View
which is itself used by a lot of other objects in the database. So I cannot
drop this field without dropping and re-creating a lot of stuff. Is there
any way around this? Is there any plans on allowing "Computed By" fields to
be "Alter"ed"?
>You might want to try Database Workbench -- via a system table
update, it allows you to "alter" computed by fields.
With regards,
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com