相关子查询中ms访问中函数错误的参数无效

时间:2016-08-06 11:53:55

标签: ms-access correlated-subquery

我在ms访问中的相关子查询中存在问题。 这是我的疑问:

SELECT t1.MfgProductId,
   (SELECT Sum(BalanceQuantity)
       FROM qry_MfgShipmentDetailWIP AS t2
       WHERE t2.MfgProductId = t1.MfgProductId) AS PrevQty
   FROM qry_MfgShipmentDetailWIP AS t1;

但是当我运行这个时我得到错误:函数的参数无效。 但是,当我这样跑:

SELECT t1.MfgProductId,
   (SELECT Sum(BalanceQuantity)
       FROM qry_MfgShipmentDetailWIP AS t2
       WHERE t2.MfgProductId = 'CFC1C06') AS PrevQty
   FROM qry_MfgShipmentDetailWIP AS t1;

运行良好。

请帮助导致错误的原因?

在ms访问sql视图中运行查询时出错:

Error while running a query in ms access sql view

0 个答案:

没有答案