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!

Aggregating / grouping varchar fields 1

Status
Not open for further replies.

fiveeuros

Programmer
Jun 1, 2005
5
GB
Hello,

if I have a table like

Code:
Name varchar(10), Status Varchar(10)

with entries

Code:
NameOne StatusOne
NameOne StatusTwo
NameOne StatusThree
NameTwo StatusOne
NameTwo StatusTwo

Is there an easy way to script some SQL that would return the following:

Code:
NameOne  StatusOne, StatusTwo, StatusThree
NameTwo  StatusOne, StatusTwo

i.e. return each name then a list of associated statuses that the name has?

Many thanks...
 
This thread is very similar to what you are asking. Please read thread183-1159740 If you have any questions after having read the thread, then feel free to add a followup question to this thread

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
That's just about what I was looking for... I should have searched the forums a bit more before I posted but thanks for the heads up!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top