I\'m using oracle 11 (not sure about the exact version, but since LISTAGG doesn\'t work, I suppose it\'s not release 2) through ODBC and crystal reports 2008.
Here
For anyone that is still using wm_CONCAT (a.k.a. older db versions): The solution is to add distinct condition, it will then also apply ascending order to the concatenated values.
Don't ask why it's not documented, but it will work.
Also, using a order by in a subquery, previous to wm_concat will just randomize the order, so it shouldn't have been recommended.
Example for the requested SQL:
SELECT TASK_CARD, WM_CONCAT(distinct code) as ZONES
FROM ODB.TASK_CARD_CONTROL
WHERE ODB.TASK_CARD_CONTROL.CONTROL_CATEGORY = 'ZONE'
GROUP BY TASK_CARD;
Just be warned that the distinct option does not work when used in procedures/packages .