改变 sql xml auto 的视图/样式
我有下面的代码(接着我之前的问题 SQL How to list Columns in a Table as a Cursor Statement)
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 信托医疗 记录(C)
M0604/210 Purby 博士医疗记录 (三)
M0604.20 Orchid Cellmark tld 费用
M0604/20 帕森斯多德
M0604/20 Dr R Oretti 药物测试
M0604/20 错误发布 CQ 的更正 013524
M0604/20 海伦·布莱克勒评估 费用(P)
有什么想法吗?谢谢
i have the below peice of code (following on for my earlier question SQL How to list Columns in a Table as a Cursor Statement)
select
(select * from
(select Narrative
from OfficeClientLedger
where ptMatter=$Matter$ and ptTrans = 4)
as Disbursments for xml auto)
Which returns
<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) "/>
However, I need it to bring me a list such as
M0604/20 Cwm Taff NHS Trust Medical
Records (C)M0604/210 Dr Purby Medeical Records
(C)M0604.20 Orchid Cellmark tld Fee
M0604/20 Parsons Dowd
M0604/20 Dr R Oretti Drug testing
M0604/20 Correction of MIssposting CQ
013524M0604/20 Helen Blackler Assessment
Fees (P)
any ideas? thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 XSL 样式表来更改从 SQL Server 检索到的 XML 的格式。
http://sqlxml.org/faqs.aspx?faq=99
You could use an XSL style sheet to change the format of the XML retrieved from SQL Server.
http://sqlxml.org/faqs.aspx?faq=99