标签:blog http os 使用 ar for sp div 2014
参考:
http://www.cnblogs.com/repository/archive/2011/01/18/1938418.html
select convert(varchar(10),c.[STARTSPECDAY],120), (select [LeaveName]+‘ ‘ from ( select convert(varchar(10),a.[STARTSPECDAY],120) STARTSPECDAY,a.[LeaveName] from [test].[dbo].[View_GetSPDay] as a ) as b where convert(varchar(10),c.[STARTSPECDAY],120)=convert(varchar(10),b.[STARTSPECDAY],120) for xml path(‘‘) ) as course_name from [test].[dbo].[View_GetSPDay] as c group by convert(varchar(10),c.[STARTSPECDAY],120)
使用 SQL的 for xml path来进行字符串拼接 (group by)
标签:blog http os 使用 ar for sp div 2014
原文地址:http://www.cnblogs.com/jindahao/p/3955389.html