D
deron
Unregistered / Unconfirmed
GUEST, unregistred user!
Select a.prno,a.OrigQty,
(select sum(qtyP) from Invlist c where c.prno=a.prno ) as InQty,
(select sum(qtyP) from Invlist c where c.prno=a.prno ) as outQty,
(select sum(qtyP) from Invlist c where c.prno=a.prno ) as rtnQty
from invcheck a
上述查询结果只显示prno,origqty字段值,inqty,outqty,rtnqty显示都为空值。
但表invcheck和invlist中都有prno=1001的纪录,如果直接使用该查询语句
select sum(qtyP) from Invlist c where c.prno=1001怎显示出正确的sum(qtyp)值。
不知什么地方出了问题。我用的数据库是Paradox.
(select sum(qtyP) from Invlist c where c.prno=a.prno ) as InQty,
(select sum(qtyP) from Invlist c where c.prno=a.prno ) as outQty,
(select sum(qtyP) from Invlist c where c.prno=a.prno ) as rtnQty
from invcheck a
上述查询结果只显示prno,origqty字段值,inqty,outqty,rtnqty显示都为空值。
但表invcheck和invlist中都有prno=1001的纪录,如果直接使用该查询语句
select sum(qtyP) from Invlist c where c.prno=1001怎显示出正确的sum(qtyp)值。
不知什么地方出了问题。我用的数据库是Paradox.