Y
yedixifeng
Unregistered / Unconfirmed
GUEST, unregistred user!
在DBGridEh表上有srkQty,要显示的是个合计数值。但是没显示出来。代码如下: Sql := 'select a.*,b.ProdName,d.factNum,e.srkQty' +' from BilIndentItem a left join BasProd b on a.ProdID=b.ProdID' +' left join BasProdDepot d on a.ProdID=d.ProdID' +' left join BasUser c on a.OpUserID=c.UserID' +' left join (select a.ProdID,sum(a.Qty) srkQty' +' from BilDepotItem a left join BilDepotMast b on a.DepotID=b.DepotID and a.DepotFlag=b.DepotFlag' +' where b.IndentID='+''''+IndentID+'''' +' and b.IndentFlag='+IntToStr(IndentFlag) +' group by a.ProdID) e on a.ProdID=e.ProdID' +' where IndentFlag=0'; +' order by a.ProdID asc'; 请教高手,这段代码为什么没能输出值?