[firebase-br] onde esta o erro?

Daniel Sonda daniel em mhnet.com.br
Sex Set 12 13:24:40 -03 2008


o group by deve conter todas os campos do select, exceto o sum

group by A.CODIGO, A.NOME

Att
Daniel Sonda

Augusto junior escreveu:
> estou tentando agrupar todas as contas vencidas dos clientes em uma so
> tabela .. so os totais..
>
> DM1.qClientes.Close;
> DM1.qClientes.SQL.Clear;
> DM1.qClientes.SQL.Add('SELECT A.CODIGO, A.NOME, SUM(B.VALOR) FROM CLIENTES
> A, CTRECEBER B');
> DM1.qClientes.SQL.Add('WHERE A.CODIGO=B.CLIENTE AND B.SITUACAO=''D'' ');
> DM1.qClientes.SQL.ADD('GROUP BY B.CLIENTE ');
> DM1.qClientes.Open;
>
> esta dando o seguinte erro...
>
> invalid expression in the select list ( not conained in either an aggregate
> function or the group by clause )
> ______________________________________________
> FireBase-BR (www.firebase.com.br) - Hospedado em www.locador.com.br
> Para saber como gerenciar/excluir seu cadastro na lista, use: http://www.firebase.com.br/fb/artigo.php?id=1107
> Para consultar mensagens antigas: http://firebase.com.br/pesquisa
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature database 3436 (20080911) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>   




Mais detalhes sobre a lista de discussão lista