this is the query as I have it now:select inmast.fpartno, inmast.fdescript, inmast.fstdcost, inmast.fonhand, inmast.fmeasure, inmast.flocate1,sum(abs(intran.fqty))ann_usage_so from inmast left outer join intranon inmast.fpartno = intran.fpartno and intran.ftoso != ' ' and intran.fdate >= '2001-11-01 00:00:00.000'and intran.fdate <= '2004-11-01 00:00:00.000'and intran.ftype = 'I'where inmast.fpartno like 'pow%' group by inmast.fpartno, inmast.fdescript, inmast.fstdcost, inmast.fonhand, inmast.fmeasure, inmast.flocate1order by inmast.fpartno UNION select inmast.fpartno, inmast.fdescript, inmast.fstdcost, inmast.fonhand, inmast.fmeasure, inmast.flocate1,sum(abs(intran.fqty))ann_usage_jobfrom inmast left outer join intranon inmast.fpartno = intran.fpartno and intran.ftojob != ' ' and intran.fdate >= '2001-11-01 00:00:00.000'and intran.fdate <= '2004-11-01 00:00:00.000'and intran.ftype = 'I'where inmast.fpartno like 'pow%' group by inmast.fpartno, inmast.fdescript, inmast.fstdcost, inmast.fonhand, inmast.fmeasure, inmast.flocate1order by inmast.fpartno
here is the error:Server: Msg 156, Level 15, State 1, Line 11Incorrect syntax near the keyword 'UNION'.