Good, I have a question. What I have to show is the following in the case that cte was 1 you have to list the following pair (WITHOUT DATA, HOLDER, INTERIM, ALTERNATE, PROV.C / RETER, PROVISORIO AT TERM) and in the case of being cte 2 Show PERMANENT, CONTRACTED, TEMPORARY, PROVISORIOUS) How can I do it since the sentence I use does not do that?
select top (10) t.tab_sit_rev_id as id,t.tab_sit_rev_desc as descripcion,t.cte_tipo_sit_rev as cte,sitrevs = (select STUFF((select ', '+ ta.tab_sit_rev_desc
from TAB_SIT_REVISTA_CARACTER ta
for xml path('')),1,1,''))from TAB_SIT_REVISTA_CARACTER t