Hello, I am looking for a way to do the MSSQL T-SQL equivalent of the MySQL aggregate function: group_concat().
We are running SQL 2005 Express. Is there a pure T-SQL way to do this, or if not, a way to create a new custom aggregate function?
EX:
SELECT GROUP_CONCAT(FIRST_NAME) AS STUDENT_LIST FROM STUDENTS GROUP BY TEACHER
OUTPUT:
JOSH,JOEY,MARK,LINDA,PAM,BILL,MIKE,JUSTIN
We are running SQL 2005 Express. Is there a pure T-SQL way to do this, or if not, a way to create a new custom aggregate function?
EX:
SELECT GROUP_CONCAT(FIRST_NAME) AS STUDENT_LIST FROM STUDENTS GROUP BY TEACHER
OUTPUT:
JOSH,JOEY,MARK,LINDA,PAM,BILL,MIKE,JUSTIN