rows into columns

gogaak

Registered User.
Local time
Tomorrow, 00:14
Joined
Feb 6, 2005
Messages
42
I have a two tables in my database related to employee ratings

Employee
TokenID
Division
Band

PMRating
TokenID
H1


Now this statement

Code:
SELECT DISTINCT Employee.Band FROM Employee

This would display me all the band levels within Employee table in each row..

Is there any way I could built a query to the Band names as seperate columns?

i'm doing this so as to display the average H1 rating for each Band level ..that is grouped by Employee.Division..
 
Use the crosstab query wizard to build the query you want.
 
Pat Hartman said:
Use the crosstab query wizard to build the query you want.


Cool thanx a lot man...
In this crosstab query you can incude only one table or query....rite..
any chance i could include more tables or queries..by some modification..

Thanx a lot..
 
You can join multiple tables in a query and reference that query in the crosstab rather than referencing a table. If you mean "can I pivot more than one column?" - the answer is no. But, you can create separate crosstab queries to pivot each column and then join the crosstabs.
 
Pat Hartman said:
You can join multiple tables in a query and reference that query in the crosstab rather than referencing a table. If you mean "can I pivot more than one column?" - the answer is no. But, you can create separate crosstab queries to pivot each column and then join the crosstabs.

Wow this is getting better and better...
But how do i join the crosstab queries.....could i do it by design view ..
I really have no idea about the syntax of joining crosstab queries..

Thanx a lot....
 
You join crosstab queries exactly the same way you join other tables or queries. Open the QBE, choose the tables/queries you want and add them to the grid. Then draw the join lines between them.
 

Users who are viewing this thread

Back
Top Bottom