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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combine Lines of Data in Query 1

Status
Not open for further replies.

ajhts

Technical User
May 1, 2001
84
US
I have a query that produces this:

Name HomePhone BusinessPhone MobilePhone
Angie 555-5555
Angie 333-3333
Angie 222-2222

I need it to combine into one line in the query like this

Name HomePHone BusinessPhone MobilePhone
Angie 555-5555 333-3333 222-2222

Please Help!
Thanks,
AJ
 
Why can't the original query do it itself ?
Anyway, you may try this:
SELECT Name, Max(HomePhone) AS aHomePhone, Max(BusinessPhone) AS aBusinessPhone, Max(MobilePhone) AS aMobilePhone
FROM yourQuery
GROUP BY Name

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top