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

A subquery question 3

Status
Not open for further replies.

Zoom1177

Programmer
Oct 25, 2006
44
US
Hi,

lets say i got this ONE table

Name________Sport
=================
Brian Soccer
Karen Golf
Barb Basketball
Terry Soccer
Mona Golf
Tim Basketball
Jack Golf

I want in ONE resultset to get the following

Soccer
=====
brian
terry

Basketball
==========
tim
barb

Golf
======
karen
mona
jack

What is the easiest way to do that using T-SQL?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top