我有一个名为Map_Data的表,数据如下:
ID SoCol Descol
125 case Per_rating when 5 then 'Good' when 4 then 'Ok' else null end D_Code
我在这个特定的行上写了一个查询,查询是:
SELECT Params = ( SELECT DesCol + ' = ''' + SoCol + ''''
FROM dbo.Map_Data t1
WHERE ID = 125
FOR
XML PATH('')
)
我得到的输出为:
D_Code = 'case per_rating
 when 5 then 'Good'
 when 4
 then 'Ok'
 end'
任何人都可以告诉我为什么我会得到 '
'
它,我该如何纠正它?