我在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视图中运行查询时出错: