Subject Re: [ib-support] COMPUTED BY (SELECT SUM("Cost") FROM Costs WHERE Costs.ID = ID)
Author Raymond Kennington
Raymond Kennington wrote:
>
> The manual states that <expr> for a COMPUTED column can be any valid query that returns a single
> result set.
>
> The following gives an error like 'unknown token' for SELECT:
>
> COMPUTED BY (SELECT SUM("Cost") FROM Costs WHERE Costs.ID = ID)
>
> so is it possible?

Yes. It's ok. When I googled, I found that an extra pair of parenthesis is required.
--
Raymond Kennington
Programming Solutions
TeamW2W (InfoPower)