select ItemInfo.ItemID,ItemInfo.ItemName,aa.SePaMo,aa.SeInMo,aa.SeFaMo,bb.StoPaMo,bb.StoInMo,bb.StoCoMo,ItemInfo.Itemys,bb.StoPaMo,cc.CoDeSt,cc.CoStock,bb.StoEsMo,cc.CoCost from ItemInfo,
(select SeItem,sum(SePaMo) as SePaMo ,sum(SeInMo) as SeInMo,sum(SeFaMo) as SeFaMo from SePactInfo group by SeItem) as aa,
(select StoItem,sum(StoPaMo) as StoPaMo ,sum(StoInMo) as StoInMo,sum(StoCoMo) as StoCoMo,sum(StoEsMo) as StoEsMo from StoPactInfo group by StoItem) as bb ,
(select CoItem,sum(CoDeSt) as CoDeSt ,sum(CoStock) as CoStock,sum(CoCost) as CoCost from CoSellInfo group by CoItem) as cc where ItemInfo.ItemName=aa.SeItem and ItemInfo.ItemName=bb.StoItem and
ItemInfo.Item=cc.CoItem这里错了,应该是ItemName
大哥谢谢你了
还有你的头像可真强