Subject | Re: [firebird-support] how to compare a value who comes from sub-select ref/eDN3012773479 |
---|---|
Author | Alexandre Benson Smith |
Post date | 2007-07-27T23:35:40Z |
dennis wrote:
Select
Customer.name customer_name,
(select sum(rest) from movements where movements.customer=customer.code) entity_rest
from
Customer
Where
Customer.deleted=0 and
(select sum(rest) from movements where movements.customer=customer.code) <> 0
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br
> The problem is that the "rest" of the customer doesn't come from an easySo, your option is the first query I suggested, this one:
> outer join but from a procedure that takes some msec to compute it.
>
>
>
> I tried to work the procedure with outer join but was much slower from
> calling it like sub-select.
>
>
>
> Is there any way in where statement to get the value by column like Delphi
> expression: field[2].value ?
>
>
>
> Kind regards
>
> Dennis
>
Select
Customer.name customer_name,
(select sum(rest) from movements where movements.customer=customer.code) entity_rest
from
Customer
Where
Customer.deleted=0 and
(select sum(rest) from movements where movements.customer=customer.code) <> 0
see you !
--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br