Subject | Re: [firebird-support] Problem when group by a sub-query |
---|---|
Author | Tomasz Tyrakowski |
Post date | 2013-07-19T20:49:51Z |
On 2013-07-19 16:18, Claudio Romero wrote:
select cobrador, sum(ftot) from (
select
(select cobrador from BUSCA_COBRADOR_POR_aplicante
(a.clave_fact)) as cobrador,
a.ftot as ftot
from VISTA_COMPROBANTES a
)
group by cobrador;
regards
Tomasz
--
__--==============================--__
__--== Tomasz Tyrakowski ==--__
__--== SOL-SYSTEM ==--__
__--== http://www.sol-system.pl ==--__
__--==============================--__
> Problem when group by a sub-queryI'd suggest a simple cheat:
> I have
> select (select cobrador from BUSCA_COBRADOR_POR_aplicante (a.clave_fact)),a.ftot
> from VISTA_COMPROBANTES a
>
> (BUSCA_COBRADOR_POR_aplicante is a Stored Procedure)
>
> I must sum(ftot) group by cobrador [...]
select cobrador, sum(ftot) from (
select
(select cobrador from BUSCA_COBRADOR_POR_aplicante
(a.clave_fact)) as cobrador,
a.ftot as ftot
from VISTA_COMPROBANTES a
)
group by cobrador;
regards
Tomasz
--
__--==============================--__
__--== Tomasz Tyrakowski ==--__
__--== SOL-SYSTEM ==--__
__--== http://www.sol-system.pl ==--__
__--==============================--__