关于数据库查询的,请大家帮帮忙,谢谢!
adoquery1.SQL.Text:='select plu.comid,plu.barcode,plu.comname,plu.standards,plu.unit,vendorstock.quantity,stock.quantity from plu,vendorstock,stock where plu.barcode like '''+edit1.Text+''' and plu.comid = vendorstock.comid and plu.comid = stock.comid';
我在edit1里输入6903148010952
注,数据表vendorstock里有6903148010952的数据有4条
格式如下 6903148010952 10
6903148010952 5
6903148010952 15
6903148010952 20
这样一查就得出了4条数据了
小弟只想得出一条,而结果是
6903148010952 50
(50是上面4条数据加起来的和)
请问要如何修改上面的SQL语句
小弟是初学者,还望各位赐教赐教!
在此先行谢过!