惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
Simon Willison's Weblog
Simon Willison's Weblog
L
LINUX DO - 最新话题
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
L
Lohrmann on Cybersecurity
博客园 - 【当耐特】
P
Privacy & Cybersecurity Law Blog
V2EX - 技术
V2EX - 技术
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Cloudbric
Cloudbric
云风的 BLOG
云风的 BLOG
K
Kaspersky official blog
T
Threat Research - Cisco Blogs
Webroot Blog
Webroot Blog
A
Arctic Wolf
C
CERT Recently Published Vulnerability Notes
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
G
Google Developers Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
The Hacker News
The Hacker News
MyScale Blog
MyScale Blog
Vercel News
Vercel News
B
Blog RSS Feed
F
Fortinet All Blogs
Google DeepMind News
Google DeepMind News
A
About on SuperTechFans
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
博客园 - 三生石上(FineUI控件)
D
Docker
O
OpenAI News
有赞技术团队
有赞技术团队
MongoDB | Blog
MongoDB | Blog
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
AI
AI
T
Tor Project blog
Project Zero
Project Zero
H
Heimdal Security Blog
Latest news
Latest news
NISL@THU
NISL@THU

博客园 - 空空儿

硬盘分区、寻址和系统启动过程 JavaScript里String.Format方法的实现 asp.net异步页 获取SQL Server数据行的物理地址信息(%%lockress%% & %%physloc%%) 利用Spire.DataExport将数据(Database/DataTable)导成各种文件 获取所有的外键信息 ASP.NET application and page life cycle SQL Server 2005 CLR 调用Web Service需要注意的几个问题 SQL SERVRE 2005 CLR TVF错误:从用户定义的表值函数获取新行时出错:Data access is not allowed in this context. PHP执行MYSQL存储过程报错:Commands out of sync; you can't run this command now 在C#里使用属性 - 空空儿 - 博客园 Read text file (txt, csv, log, tab, fixed length) 批量写数据---将XML数据批量写入数据库 对对象类型和调用方法属性进行存储以提升反射性能 过程 sp_addlinkedsrvlogin,第 91 行解密过程中出错的解决办法 生成大量随机字符串不同实现方式的效率对比 用SQL SERVER 2005新提供的命令实现行列转换 APM (异步编程模型) 利用宏让ERStudio生成代码文件
使用XML的value()方法将多行数据合并成一列
空空儿 · 2011-03-04 · via 博客园 - 空空儿

从系统视图sys.syscomments里可以得到存储过程的项,text字段记录了存储过程定义的实际文本,如果存储过程的长度超过4000长度,将使用新行记录,colid字段记录相应的行序号.

以下语句使用XML结合value()方法将同一存储过程的多行text字段合并成一列显示:

select object_name(id)procedure_name,text+isnull(
(
    (
select text from sys.syscomments b where a.id=b.id and b.colid>1 for xml path(''),root('root'),type)
    .value(
'/root[1]','nvarchar(max)')
),
'') procudure_text
from sys.syscomments a where number=1 and colid=1