Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Joining Matching Records into one

Status
Not open for further replies.

spow

Technical User
Jun 11, 2002
8
US
Suppose I have the following data that I want to run a Query on:

Name: Age: Size: Gender:
Bill 10
Mary 20
Bill XL
Mary S
Bill M
Mary F

How would I do a query to output the following:
Name: Age: Size: Gender:
Bill 10 XL M
Mary 20 S F

I'm sure it's obvious, but I'm stuck :( Thanks for any help!!
 
Is this example one table with six records, three for each person? If so, this is going to make things very difficult. It should be one record each with all the values. That is probably what is causing your confusion. "Alcohol is our friend, and it's about time we had more friends over."

Terry M. Hoey
 
No, actually this comes from another Query. This is an extremely simplified example of what I'm trying to do. I think I can do this with an INNER JOIN ?
 

Try this.

Select
Name,
Max(Age) As mAge,
Max(Size) As mSize,
Max(Gender) As mGender
From TheOtherQuery
Group By Name Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top