MS-Access pivot columns

2019-08-28 05:09发布

问题:

I create an MS Access 2007 query where the same customer has multiple project and data appear like:

1 | Foo
1 | Bar
1 | Baz
2 | For
3 | Cad
3 | Cam

and I want to transform it into something like

1 | Foo | Bar | Baz
2 | For |
3 | Cad | Cam |

The goal is to create a spreadsheet view per customer (1,2,3) which can be read from word in order to create mailings per client

回答1:

There is a very informative Database Journal article that does something similar to what you want; however, it states that there is no way to this in a query, and so it must be done in VBA.