
Hi all,
I stumbled upon a rather simple looking problem. i want the sum of multiple values from a table with group by, but i am not getting the value in the returning table buffer. below is my query and table data.
while select sum(RegAmount), sum(RegQuantity) ,sum(SalHours),sum(SalAmount),sum(OTHrs),sum(OTAmt),Dept,DeptName from mainTable
group by mainTable.Dept
{
info(strFmt("%1,%2,%3",mainTable.Dept,mainTable.SalHours,mainTable.SalAmount));
}
what is wrong with my query and how can i achieve this. Thank you
What exactly are you missing in the result?
BTW, I see you're trying to select DeptName, but it won't ever have any value, because you neither aggregate it nor group by it.