Fórum Erro de Group By #254525
14/10/2004
0
Estou usando o Firebird 1.5 e não estou conseguindo utilizar o group by
vejam minha select
Vejam o erro
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause).
Desde já obrigado pela ajuda
vejam minha select
select registro,Data,Conta_Movimentada,ContraPartida,Nlancamento,complemento, Valor_D,Valor_C ,sum(registro) from lco_101 where idcliente=1 group by Data
Vejam o erro
Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause).
Desde já obrigado pela ajuda
Ricas
Curtir tópico
+ 0
Responder
Posts
15/10/2004
Aroldo Zanela
Colega,
Isto:
ou isto:
Isto:
select registro,Data,Conta_Movimentada,ContraPartida,Nlancamento,complemento, Valor_D,Valor_C ,sum(registro) from lco_101 where idcliente=1 group by registro,Data,Conta_Movimentada,ContraPartida,Nlancamento,complemento, Valor_D,Valor_C
ou isto:
select Data, sum(registro) from lco_101 where idcliente=1 group by Data
Responder
Gostei + 0
15/10/2004
Ricas
Valeu, estou acustumado com o MYSQL, e com ele eu poderia agrupar apenas com um campo, como no meu modelo
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)