我想获得这样的查询MS Access查询聚集
SELECT sales.action_date, sales.item_id, items.item_name,
sales.item_quantity, sales.item_price, sales.net
FROM sales INNER JOIN items ON sales.item_id = items.ID
GROUP BY sales.item_id
HAVING (((sales.action_date)=[Forms]![rep_frm]![Text13].[value]));
每次我试图表明数据此消息显示
您的查询不包括指定表达式“行动日” 作为聚合函数的一部分。
和查询中的所有领域>>>但我只是想聚集是ITEM_ID
我应该怎么办?
如果你要包括在SELECT语句中的所有字段需要有某种形式对他们聚集等领域。默认是GROUP BY。如果您使用一些示例和结果数据来编辑帖子;也许我们可以帮助你更好! – PaulFrancis 2014-10-10 13:27:33