Subject Re: [ib-support] Computed by Type
Author Paul Reeves
Gerhardus Geldenhuis wrote:

> The only clause that works is
> DATEOFCOMPLETION COMPUTED BY (DATEOFCOLLECTION-1),
>
> How do I specify "type" and "computed by" for the same field?
>

Use a CAST expression. eg:

create table test_comp1(
ats timestamp,
yesterday computed by (cast(ats-1 as timestamp))
);

Paul
--

Paul Reeves
http://www.ibphoenix.com
taking InterBase further