我的特殊问题是这样的:
ItemNo DocumentNo TotalQty
TK1 Doc1 9
TK2 Doc2 15
TK2 Doc4 15
我们想要:
ItemNo DocumentNo TotalQty
TK1 Doc1 9
TK2 Doc2 & Doc4 15
我尝试过的解决方案来自这里: How to concatenate text from multiple rows into a single text string in SQL server?
但是MS Access不支持这些功能,例如DECLARE。
有什么想法吗?
编辑:
我正在关注此解决方案: How to design a query to give names of each related field linked to each set of data
然后我写道:
SELECT Query3.ItemNo
DJoin("[Query3.DocumentNo]","[Query3]","[Query3.ItemNo] = " & [Query3.ItemNo] & ""," & ") AS DocumentNo
FROM Query3;
但是,我收到此错误:
Syntax error (missing operator) in query expression
我看不到错误在哪里。