I have a database where there are 2 fields similar (that match another table) and then the third is unique. I want to convert the table to have the 3rd unique value listed in columns instead of a separate record.
I.E.
5/1/2013 A321 1 $1,120
5/2/2013 A325 1 $2,261
5/1/2013 A321 2 $2,120
will convert to
5/1/2013 A321 $1,120 $2,120
5/2/2013 A325 $2,261
I could create separate queries for each value in column 3 and then have another query that joins them in the fashion I want them to but I was hoping there was a more elegant solution.
For test data in [OldTable]
the Crosstab Query
returns
If you want to actually create a new table containing those results then save the above query in Access as [xtabQuery] and then run
I would open up the Query Wizard and create a Crosstab Query. It should prompt you to put in what you want for the columns and records.
When the query has been written by the Wizard, just make that into a MakeTable query by opening it in SQL View and adding "INTO MyNewTable" before the FROM statement.