1
我有以下T-SQL(SQL Server 2008),我需要使用數據庫郵件向結果發送電子郵件。將SQL Server T-SQL的結果轉換爲可讀的文本格式
select top 5 col1, col2, col3, col4, col5, col6
from aTable
order by colOrder desc
col1 to col6是long nvarchar(4000),結果是不可讀的。我希望結果顯示爲
col1: aaa asa 11 11111111111111111111111111111111111111
col2: 22222222222222222222222222222222222222222222222222222222
col3: 333333333333333333333333333333333333333333333333333333333333333333
col4: 44444444444444444
col5: 555555555555555555555
col6: 666666666666
col1: bbbbbbb 1111111111111111111111111111111111
col2: 22 222 222222222222222222222
....
是否有可能使用for xml
與XLST變換的結果呢?