views:

16

answers:

0

I developed a script on MySQL 5.1, not realising the client is stuck with MySQL 3.23. It makes significant use of GROUP_CONCAT() and particularly GROUP_CONCAT(DISTINCT), to reduce a column of values down to a succinct, comma-separated list.

So, are there any workarounds? The best I can think of is doing a separate query to just get the DISTINCT values back, then concatenating them in my app (Java).

Constraints: I don't have admin access to the machine (can't even check what userfuncs are installed). Not sure if I can create views, I suspect not. Performance is not an issue. Interestingly, group_concat() is recognised, but it always results in zero-length strings, so is as good as absent, unless I'm missing something.