Subject Cannot alter calculated field.
Author Ranando King
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]