Could someone explain why?

W

WebRaster

Could someone explain why this SELECT produce an error message ?


SELECT cc_nome, count(incc) as tot, incc
FROM conta_ea GROUP BY cc_nome
ORDER BY cc_nome ASC;

----------------------------------------------------------------------------
 
B

Bas Cost Budde

WebRaster said:
SELECT cc_nome, count(incc) as tot, incc
FROM conta_ea GROUP BY cc_nome
ORDER BY cc_nome ASC;
Microsoft OLE DB Provider for ODBC Drivers error "80004005'

What is conta_ea? I suspect it is a table that is corrupt, or is
reachable over ODBC only and an error occurs there.
 
M

Michel Walsh

Hi,


Because incc, the third item in the SELECT clause, is neither GROUP BY
neither aggregated.


SELECT cc_nome, COUNT(incc) As Tot
FROM contra_ea
GROUP GY cc_nome
ORDER BY cc_nome ASC;


should do.




Hoping it may help,
Vanderghast, Access MVP
 
Top