请教,slQty等于Qty*wQty,该如何写?(100)

  • 主题发起人 主题发起人 yedixifeng
  • 开始时间 开始时间
Y

yedixifeng

Unregistered / Unconfirmed
GUEST, unregistred user!
要导出Excel,TDBGridEh表上有a.Qty、d.wQty,都是数量,现在TDBGridEh表再加一个slQty,不在任何数据库中,只在表上显示,应该是slQty等于Qty*wQty,该如何写呢?下面的代码是没加slQty前的: G_OpenSQL('select a.*,b.ProdName,c.factNum,d.MATERIALID,d.Qty as wQty' +' from BilIndentItem a left join BasProd b on a.ProdID=b.ProdID' +' left join BasProdDepot c on a.ProdID=c.ProdID' +' left join BASBOMITEM d on a.ProdID=d.ProdID' +' where a.IndentID='+''''+IndentID+'''' +' and a.IndentFlag='+IntToStr(IndentFlag) +' order by a.ProdID asc',adsItem);
 
G_OpenSQL('select a.*,b.ProdName,c.factNum,d.MATERIALID,d.Qty as wQty,' + 'a.qty*d.wQty as slQty' +' from BilIndentItem a left join BasProd b on a.ProdID=b.ProdID' +' left join BasProdDepot c on a.ProdID=c.ProdID' +' left join BASBOMITEM d on a.ProdID=d.ProdID' +' where a.IndentID='+''''+IndentID+'''' +' and a.IndentFlag='+IntToStr(IndentFlag) +' order by a.ProdID asc',adsItem);
 
多人接受答案了。
 
后退
顶部