Subject | Re: [firebird-support] Cannot alter calculated field. |
---|---|
Author | Jason Dodson |
Post date | 2005-05-18T18:33:23Z |
Yes... even though everywhere else in the world, casting implies
truncation, in Firebird/interbase, it actually rounds.
Jason
Ranando King wrote:
truncation, in Firebird/interbase, it actually rounds.
Jason
Ranando King wrote:
> I have a field in a table defined as
>
> "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 assumed is because of how floating point numbers are cast into integers. The 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"?
>
> R.
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>