All Forums Database
jsamantarai 1 post Joined 11/12
13 Apr 2013
Listagg, wm_concat or Group_concat equivalent in teradata

 

I want to aggregate as "comma-separated values" within a "group by", like MYSQL group_concat:

SELECT dept, GROUP_CONCAT(ename) as employees FROM EMP GROUP BY dept;
or ORACLE listagg:
select dept, listagg(ename, ',') within group (order by ename) as employees ..
What the equivalent SQL syntax  in teradata.
 

subhadip 4 posts Joined 03/11
04 Jul 2013

You have to use with recursive to implement listagg.

You must sign in to leave a comment.