|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
请问,我想把一个交叉查询的内容更新到表里去,SQL如下,高手看看有什么错误?
PARAMETERS [请输入年份] Short, [请输入月份] Short;
TRANSFORM Sum([allquery].[quantity]) AS quantity之Sum
SELECT [stock].[location], [allquery].[type], [stock].[material_number], [stock].[name], [stock].[specification], [stock].[unit], [stock].[memory]
INTO statbymonth FROM stock INNER JOIN allquery ON [stock].[material_number]=[allquery].[material_number]
WHERE (((Year([date]))=[请输入年份]) AND ((Month([date]))=[请输入月份]))
GROUP BY [allquery].[type], [stock].[material_number], [stock].[name], [stock].[specification], [stock].[unit], [stock].[memory], [stock].[location]
PIVOT [allquery].[in_out]; |
|