List:General Discussion« Previous MessageNext Message »
From:Brent Baisley Date:August 14 2006 12:17pm
Subject:Re: Joining result sets into 1 row
View as plain text  
I think what you are looking for is GROUP_CONCAT. Without more info I can't really tell
though.
http://dev.mysql.com/doc/refman/4.1/en/group-by-functions.html

----- Original Message ----- 
From: "Steffan A. Cline" <steffan@stripped>
To: <mysql@stripped>
Sent: Sunday, August 13, 2006 6:53 PM
Subject: Joining result sets into 1 row


>I am in a situation where I have say 1 column called "attribute" I need and
> the result set is 3 rows. i.e.
> ROW 1 - Mechanic
> ROW 2 - Carpenter
> ROW 3 - Plumber
> I want to have the rows returned as one row
> Such as 
> ROW 1 Mechanic, Carpenter, Plumber
> 
> Something like a literal join would be beautiful such as :
> ROW 1 Mechanic, Carpenter and Plumber
> 
> I think the latter is asking for too much but the first would be awesome.
> 
> Any advice is much appreciated!
> 
> 
> Thanks
> 
> Steffan
> 
> ---------------------------------------------------------------
> T E L  6 0 2 . 5 7 9 . 4 2 3 0 | F A X  6 0 2 . 9 7 1 . 1 6 9 4
> Steffan A. Cline
> Steffan@stripped                             Phoenix, Az
> http://www.ExecuChoice.net                                  USA
> AIM : SteffanC          ICQ : 57234309
>                                  Lasso Partner Alliance Member
> ---------------------------------------------------------------
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
Thread
Joining result sets into 1 rowSteffan A. Cline14 Aug
  • Re: Joining result sets into 1 rowOw Mun Heng14 Aug
  • Re: Joining result sets into 1 rowBrent Baisley14 Aug
  • Re: Joining result sets into 1 rowBrad Jahnke14 Aug
Re: Joining result sets into 1 rowOw Mun Heng14 Aug