select (select title+'-' from table_b where pid=a.id for xml path(''))
From table_a a如搜索出来后有重复的值(title1,title3重复)
title1-title1-title2-title3-title3-title4-title5怎么把重复的值合并,实现
title1-title2-title3-title4-title5
From table_a a如搜索出来后有重复的值(title1,title3重复)
title1-title1-title2-title3-title3-title4-title5怎么把重复的值合并,实现
title1-title2-title3-title4-title5
for xml path(''))
From table_a a
select (select distinct title+'-' from table_b where pid=a.id for xml path(''))
From table_a a
select (select distinct title+'-' from table_b where pid=a.id for xml path(''))
From table_a a
++
(select distinct title+'-' from table_b where pid=a.id for xml path(''))
From
table_a a