Subject Re: [firebird-support] COMPUTED BY
Author Alberto Pesce
Thanks! work fine
Alberto

----- Original Message -----
From: "Ivan Prenosil" <Ivan.Prenosil@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, April 13, 2006 3:47 PM
Subject: Re: [firebird-support] COMPUTED BY


> > It is possible use a SELECT in a COMPUTED BY? What is the syntax?
>
> Syntax for COMPUTED BY is
>
> COMPUTED BY (<expression>)
>
> If you need SELECT to behave like expression (part of expression) it must
be
> enclosed in parenthesis, i.e.
>
> (SELECT SUM(ABC) FROM TAB WHERE ...)
>
>
> So, to combine these two you need two pairs of parenthesis, e.g.
>
> COMPUTED BY ( (SELECT SUM(ABC) FROM TAB WHERE ...) )
>
> Ivan
> http://www.volny.cz/iprenosil/interbase/
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> 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
>
>
>
>
>
>