【发布时间】:2013-06-25 08:41:28
【问题描述】:
基本思想是我在Access 2007中有一个这种形式的表格:
Company Name | Address | Product
Company A 123 Fakestreet Phone
Company A 123 Fakestreet Computer
Company A 123 Fakestreet Car
Company B 456 Fakestreet Football
Company B 456 Fakestreet Basketball
Company B 456 Fakestreet Golf Ball
我希望它是这种形式:
Company Name | Address | List of Products
Company A 123 Fakestreet Phone, Computer, Car
Company B 456 Fakestreet Football, Basketball, Golf Ball
我尝试使用 Allen Browne 的 ConcatRelated 函数 (http://allenbrowne.com/func-concat.html),起初它不起作用,因为我忘记启用 VBA 内容。我这样做了,现在 Access 只是一直冻结而没有响应。我使用了下面的查询(表的名称是地址)。我省略了地址列只是为了看看我是否可以让它工作,然后我打算把它放回去。:
SELECT Company_Name, ConcatRelated("Product","Addresses")
FROM Addresses;
有没有人发现它有什么问题?我唯一能想到的是我的表的大小(约 290,000 行)可能会使其太慢,但我已经在表上运行了不同的查询而没有问题。
【问题讨论】: