select department_id,listagg(department_name, ',') WITHIN GROUP(ORDER BY department_name) department_name from T_WX_CORP_DEPARTMENT group by department_id;
DB2数据库10.1
执行该语句时,报错:Lookup Error - DB2 Database Error: ERROR [42601] [IBM][DB2/NT64] SQL0104N An unexpected token "department_id,listagg(department_name, ',') WITHIN" was found following "select ". Expected tokens may include: "