Is there any equivalent of Listagg function of oracle in teradata. With recursive is an option I have tried, but wanted something other than.
Thanks Aritra
If Teradata's XML-services are installed (default since 14.10?) there's a function named XMLAGG, e.g.
SELECT DatabaseName, TABLENAME,
TRIM(TRAILING ',' FROM (XMLAGG(TRIM(Columnname)|| ',' ORDER BY ColumnId) (VARCHAR(10000))))
FROM dbc.ColumnsV
WHERE databasename = 'dbc'
AND TABLENAME = 'ColumnsV'
GROUP BY 1,2