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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
Blog — PlanetScale
Blog — PlanetScale
V
Visual Studio Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
博客园 - Franky
IT之家
IT之家
博客园 - 叶小钗
Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
腾讯CDC
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
人人都是产品经理
人人都是产品经理
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
博客园_首页
G
Google Developers Blog

博客园 - 空紫竹

Crystal Report Error: Either the Crystal Reports registy key permission are insufficient or the Crystal Reports runtime is not installed correctly SSRS 例子的网站 SSRS配置 JQuery, Silverlight 公用WCF 获取数据库中有默认值的所以字段 Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0 IIS 时间问题 sql server 创建临时表 系统程序监控软件 Window 7sp1 安装vs2010 sp1 打开xaml文件崩溃 windows 2008 安装 sql server 2008 详解Silverlight中PivotViewer控件编程实例 CSS资源网址 SQL server 2008 安装和远程访问的问题 vss File for <file> (<physical file>) Was Not Found silverlight 报错超时 sql server isnumeric 函数 asp 中的getChunk(img_size) Windows 7 恢复删除的数据
sql server xml nodes 的使用
空紫竹 · 2012-09-20 · via 博客园 - 空紫竹

--select  a.RptID,T.C.value('.','nvarchar(100)')

--from 

--(select RptID,

--  txt=convert(xml,'<root><v>'+replace(txt,',','</v><v>')+'</v></root>') 

--from Test

--)a

--outer apply a.txt.nodes('/root/v') AS T(C)

declare @TempAllPro varchar(3000)

declare @TempAllProXml xml

set @TempAllPro='1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46'

set @TempAllProXml=convert(xml,'<root><v>'+Replace(@TempAllPro,',','</v><v>')+'</v></root>')

declare @ProPageHead table(Id int)

insert into @ProPageHead(Id)

select C.value('.','int')

from @TempAllProXml.nodes('/root/v') T(C)