Rearranging Data

J

J Dizzle Fizzle

I am sure there is a simple way to do this, but here it goes.

I have a table structured as follows:

Team Year Statistic
TeamA 2000 100
TeamB 2000 120
TeamA 2001 95
TeamB 2002 115

How can I run a query to create a new table that would look like the
following:

Team 2000 2001
TeamA 100 95
TeamB 120 115

Thanks in advance!
 
O

Ofer Cohen

You cab try using a CrossTab Query, try the query wizard to create one.


TRANSFORM Last(TableName.Statistic) AS LastOfStatistic
SELECT TableName.Team
FROM TableName
GROUP BY TableName.Team
PIVOT TableName.Year
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top