在SQL Server中编辑xml

时间:2017-03-31 13:16:30

标签: sql-server xml

我在sql server中有一个像这样的表

Table

我将这些数据格式化为html

SELECT Isnull(dbo.Rtrimwhitespace(Ltrim([read date])), 'NULL')                AS [td], 
       Isnull(dbo.Rtrimwhitespace(Ltrim([collection configuration])), 'NULL') AS [td], 
       Isnull(dbo.Rtrimwhitespace(Ltrim([summary type])), 'NULL')             AS [td], 
       Isnull(dbo.Rtrimwhitespace(Ltrim([total number])), 'NULL')             AS [td], 
       Isnull(dbo.Rtrimwhitespace(Ltrim([# mep count])), 'NULL')              AS [td], 
       Isnull(dbo.Rtrimwhitespace(Ltrim([% mep])), 'NULL')                    AS [td]

FROM   ##collection_window_monitor 
ORDER  BY [read date] ASC, 
          [collection configuration] ASC, 
          [summary type] ASC, 
          [total number] ASC, 
          [# mep count] ASC, 
          [% mep] ASC 
FOR xml raw('tr'), elements 

现在我想为[summary type] like '%Not Valid%'

的trs添加样式

我该怎么做?

0 个答案:

没有答案