edgarv (MIS) Sep 30, 2004
I was wondering if I could have a sql statement that does a SUM
I have tried
select FECHNB, FEABBJ, CUSNM, DDAITX, DDARQT01, DDARQT0101, INVAMT0201, sum(INVAMT0202)as INVAMT0202 From WEBQRY.ACCCOMB3
but then I have to add Group by and all the fields otherwise it does not work.
Is there a way to just have a sum or do I have to group by, and if I group by is there a way just to group by one of the fields?
I was wondering if I could have a sql statement that does a SUM
I have tried
select FECHNB, FEABBJ, CUSNM, DDAITX, DDARQT01, DDARQT0101, INVAMT0201, sum(INVAMT0202)as INVAMT0202 From WEBQRY.ACCCOMB3
but then I have to add Group by and all the fields otherwise it does not work.
Is there a way to just have a sum or do I have to group by, and if I group by is there a way just to group by one of the fields?