AX 2009 - select count

hi,

I have below select.

while select count(itemName), itemName
from inventTable
group by itemName

How can I call count value ? inventTable.ItemName I can’t compare with int

Try this :

while select count(RecID), itemName
from inventTable
group by itemName

And call the count value as inventTable.RecId.

Regards

Nitish