Re: building comma-separated list of strings from subquery

2007-06-13 Thread Brent Baisley
You probably want to look at the group_concat function. It doesn't work as a subselect, but it allows you to group a set of records and "rollup" the different values in the grouping. Christian Hansel wrote: I'ld like to accomplish something like: set @myvar=concat_ws(",",(SELECT column from t

RE: building comma-separated list of strings from subquery

2007-06-13 Thread Christian Hansel
>I'ld like to accomplish something like: > >set @myvar=concat_ws(",",(SELECT column from table1 order by column; >where ...)) > >or > >select concat_ws(",",(SELECT column from table1 order by column where ...)); > >for further usage in sql-scripts I forgot to mention: As I need it in a function, i

building comma-separated list of strings from subquery

2007-06-13 Thread Christian Hansel
Hi y'all, I'ld like to accomplish something like: set @myvar=concat_ws(",",(SELECT column from table1 order by column; where ...)) or select concat_ws(",",(SELECT column from table1 order by column where ...)); for further usage in sql-scripts -- MySQL General Mailing List For list archive