Hi all, What I meant to ask was: a) Either an ORDER BY clause/equivalent for group_concat() [not GROUP BY as originally posted], or an assurance that the kludge of sorting a sub-query first and then grouping the result does and will continue to work - I need this functionality.
This is what happens when you post when tired! My thanks to Darren Duncan who questioned what I was asking for. Sorry I can't reply directly to Darren's message as I get the list via digest. I am using group_concat() to form lists of team members in a single report field, and wish to control the order of the items concatenated. The documentation explicitly states that "The order of the concatenated elements is arbitrary", but searching the internet finds a number of answers along the lines of: select a, group_concat(b) from (select a, b from db order by a, b desc) order by a; where the ordering of the sub-select "b desc" is preserved in the group_concat() result. This seems to work in practice, but I would really like to have surety on a way to achieve this other than doing it in my application; other SQL implementations have this feature. Thanks, Len Chisholm.