If you're using MySQL 4.1, you have the GROUP_CONCAT(expr) function. If not, then... i think someone has already done an UDF about this... Search the archives..or see this:
http://www.cwts.nl/buter/misc/my-mysql.html -- Diana Soares On Wed, 2003-11-12 at 08:56, Ciprian Trofin wrote: > Is there a way to use a string concatenating function in connection with a > GROUP BY clause? I mean, for a one-to-many relation (like firm-stockholders > relation), to "catch" a structure like: > > firm | stocholders > -------------------- > f_1 | s_1; s_2; s_3 > f_2 | s_4; s_5 > f_3 | s_6 > > instead of > firm | stocholders > -------------------- > f_1 | s_1 > f_1 | s_2 > f_1 | s_3 > f_2 | s_4 > f_2 | s_5 > f_3 | s_6 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]