Hi all, I need to do a SELECT using a sum function and also get one more field in the SELECT, but I have some problem that prevents the second field from being displayed in the result. Here is an example:
while select sum(AvailPhysical), ItemId
from inventSum
where (!inventSum.Closed) && (!inventSum.ClosedQty) &&
(inventSum.AvailPhysical != 0)
join sumInventDim
group by InventLocationId, wMSLocationId, InventBatchId, InventSerialId
where (sumInventDim.InventDimId == inventSum.InventDimId) &&
(sumInventDim.InventLocationId == '004') &&
(sumInventDim.wMSLocationId == '5-A-01/1')
exists join wmsLocation
where (wmsLocation.InventLocationId == sumInventDim.InventLocationId) &&
(wmsLocation.wMSLocationId == sumInventDim.wMSLocationId) &&
((wmsLocation.locationType == WMSLocationType::Buffer) ||
(wmsLocation.locationType == WMSLocationType::Pick))
{
info(strfmt("Item: %1 - Qtd: %2",inventSum.ItemId, inventSum.AvailPhysical));
}

*This post is locked for comments
I have the same question (0)