日期:2014-05-18 浏览次数:20597 次
SELECT s.SUBMITTIME ,s.FAULTLEVEL,COUNT(S.FLEVEL) AS [FLEVEL] FROM (SELECT Convert(nvarchar(100),a.SUBMITTIME,23) AS SUBMITTIME, b.FAULTLEVEL AS FAULTLEVEL,b.FAULTLEVEL AS FLEVEL from (select SUBMITTIME,FAULTLEVEL=convert(xml,'<root><v>'+replace(FAULTLEVEL,';','< /v><v>')+'</v></root>') from [View_GetMMInfoForReport] as a outer apply (select FAULTLEVEL=c.v.value('.','nvarchar(100)') from a.FAULTLEVEL.nodes('/root/v') as c(v) ) as b ) as s GROUP BY s.SUBMITTIME,s.FAULTLEVEL