I need a setup in Access where some rows in a table are converted to columns…for example, lets say I have this table:
Team Employee DaysWorked
Sales John 23
Sales Mark 3
Sales James 5
And then through the use of a query/form/something else, I would like the following display:
Team John Mark James
Sales 23 3 5
This conversion of rows to columns would have to be dynamic as a team could have any number of Employees and the Employees could change etc. Could anyone please guide me on the best way to achieve this?
You want to create a CrossTab query. Here’s the SQL that you can use.
Of course the output is slightly different in that the columns are in alphabetical order.
For more detail see Make summary data easier to read by using a crosstab query at office.microsoft.com