改变sql xml auto的视图/样式

| 我有下面的代码(下面是我前面的问题SQL如何将表中的列作为游标语句列出)
select 
    (select * from
        (select Narrative 
         from OfficeClientLedger
         where ptMatter=$Matter$ and ptTrans = 4) 
     as Disbursments for xml auto)
哪个返回
<OFFICECLIENTLEDGER NARRATIVE=\"M0604/20 Cwm Taff NHS Trust Medical Records (C)\"/><OFFICECLIENTLEDGER NARRATIVE=\"M0604/210 Dr Purby Medeical Records (C)\"/><OFFICECLIENTLEDGER NARRATIVE=\"M0604.20 Orchid Cellmark tld Fee\"/><OFFICECLIENTLEDGER NARRATIVE=\"M0604/20 Parsons Dowd Psychological Ltd Assessment Fees\"/><OFFICECLIENTLEDGER NARRATIVE=\"M0604/20 Dr R  Oretti Drug testing\"/><OFFICECLIENTLEDGER NARRATIVE=\"M0604/20 Correction of MIssposting CQ 013524\"/><OFFICECLIENTLEDGER NARRATIVE=\"M0604/20 Helen Blackler Assessment Fees (P) \"/> 
但是,我需要它来带给我诸如以下的列表   M0604 / 20 Cwm Taff NHS Trust Medical   记录(C)      M0604 / 210 Purby Dr病历   (C)      M0604.20兰花Cellmark tld费用      M0604 / 20帕森斯道琼斯      M0604 / 20 R Oretti博士药物测试      M0604 / 20错误发布CQ的更正   013524      M0604 / 20 Helen Blackler评估   费用(P) 有任何想法吗?谢谢     
已邀请:

bab

select
(select cast(Narrative as varchar(max))
from OfficeClientLedger
where ptMatter=$Matter$ and ptTrans = 4
as Disbursments for xml path(\'\'), true)
    
您可以使用XSL样式表来更改从SQL Server检索到的XML的格式。 http://sqlxml.org/faqs.aspx?faq=99     

要回复问题请先登录注册