Can SQL/Access display foreign key rows as columns

2019-09-17 01:50发布

问题:

I have an MS Access table that has a many-to-one key to another one, and I would like a query to display those items in one row. For example, Foo, Bar and Baz link to the row with ID 1, so I would like to display:

1 | Foo | Bar | Baz

instead of

1 | Foo
1 | Bar
1 | Baz

回答1:

Look at Access's PIVOT TRANSFORM.
I think that is what you will need.