[firebase-br] Select no banco para montar registr C190 do Sped Fiscal
samuel ferreira
samuel.peres.ferreira em gmail.com
Ter Abr 19 13:56:07 -03 2011
ola
vc nao pode fazer group by pelo campos de soma.
tente isso
SELECT ITS.CSTICMS, ITS.CFOP, ITS.ALIQICMS, SUM(ITS.VLRTOTAL) AS VLRTOTAL,
SUM(ITS.BCICMS) AS BCICMS, SUM(ITS.VLRICMS) AS VLRICMS,
SUM(ITS.BCICMSST), SUM(ITS.VLRICMSST), SUM(ITS.REDBCICMS) AS REDBCICMS,
SUM(ITS.VLRIPI) AS VLRIPI
FROM D_NFE AS ITS
INNER JOIN C_NFE AS ENT ON ITS.CODIGO = ENT.CODIGO
WHERE ITS.CODIGO = 6
GROUP BY ITS.CSTICMS, ITS.CFOP, ITS.ALIQICMS
samuel
Mais detalhes sobre a lista de discussão lista