i'm trying to migrate a mysql view from mysql to sql server 2008, but there is a funcion called "group_concat" and i cant emulate it in sql server.
Here is the code
select
permiso.ID AS ID,replace(
group_concat(cuerpo_legal.descripcion, _utf8' ',
documento_legal.NUM_CUERPO_LEGAL, _utf8' / ',
documento_legal.ANNO_CUERPO_LEGAL separator ',')
,_utf8',', _utf8' ; ') AS cuerpo_legal
from
(((permiso
join permiso_doc_legal ON ((permiso_doc_legal.ID_PERMISO = permiso.ID)))
join documento_legal ON ((documento_legal.ID = permiso_doc_legal.ID_DOCUMENTO_LEGAL)))
join cuerpo_legal ON ((cuerpo_legal.id_cuerpo_legal = documento_legal.ID_CUERPO_LEGAL)))
group by permiso.ID
I've tried diferent ways and searched here in stackoverflow but none one works
Thanks!