Mikek5665
asked on
Desperate - Need to turn columns into rows
I have 2 Microsoft Access databases. One table has a users information and another has survey questions and their answers. I need to get the user info and that person's answers into a row.
The tables look like this:
FirstName LastName Address SurveyNumber
Joe Smith Maple Street 1
Juan Gonzalez First Street 2
SurveyNumber Question Answer
1 Height 6 foot
1 Weight 250
2 Height 6 foot 1
What query and/or report can I write to make it look like this:
FirstName LastName Height Weight
Joe Smith 6 foot 250
Juan Gonzalez 6 foot 1
Thank you very much in advance
The tables look like this:
FirstName LastName Address SurveyNumber
Joe Smith Maple Street 1
Juan Gonzalez First Street 2
SurveyNumber Question Answer
1 Height 6 foot
1 Weight 250
2 Height 6 foot 1
What query and/or report can I write to make it look like this:
FirstName LastName Height Weight
Joe Smith 6 foot 250
Juan Gonzalez 6 foot 1
Thank you very much in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you so much. The delay in accepting the answer was because I had to get the work done and out the door first. Yay!!!
from UserInfo U
join Survey H
on H.SurveyNumber = U.SurveyNumber
and H.Question = 'Height'
join Survey W
on W.SurveyNumber = U.SurveyNumber
and W.Question = 'Weight'