I have a report to which I need to add the field oitb.itmsgrpnam but not sure how to join it in, anyone's help would be appreciated.
Script as it stands:
SELECT t0.itemcode,t1.itemname, cast(t0.onhand as int) as 'Stock', cast (t0.iscommited as int) as 'Sales Orders', (cast(t0.onhand as int) - cast(t0.iscommited as int)) as 'Free Stock', t1.lstevlpric, t1.frgnname
FROM oitw t0 inner join oitm t1 on t0.itemcode = t1.itemcode
WHERE t0.whscode = '[%0]' and t0.onhand > t0.iscommited
ORDER BY t1.itemcode asc