XML 大兴其道。文件越来越大。在SqlServer中查询检索,会使工作得心应手。 常用SQL: 1. 提取关心数据。以表行的形式列出。要注意的是。Xquery在解析 XML 文档里,无素内容是和关键字是区分大小写的。 create table #t(id int ,xmxml) insert into #t(id,xm)
XML 大兴其道。文件越来越大。在SqlServer中查询检索,会使工作得心应手。
常用SQL:
1. 提取关心数据。以表行的形式列出。要注意的是。Xquery在解析 XML 文档里,无素内容是和关键字是区分大小写的。
create table #t (id int ,xm xml)
insert into #t(id,xm)
select 1 , * from OpenRowSet( Bulk 'D:\Program Files\StormII\config.xml', Single_Blob ) as x
--只关心 其他视频/音频文件
insert into #t(id,xm)
select 2,xm.query('for $f in /config/association/type[@category="其他视频/音频文件"] return $f') as result from #t
declare @x xml
select @x=xm from #t where id = 2
insert into #t select 3,t.c.query('.')from @x.nodes('/type/item') t(c)
select xm.value('(/item/@format)[1]','varchar(30)' ) as format ,xm.value('(/item/@description)[1]','varchar(30)' ) as description
from #t where id = 3
go
select xm.value('(/item/@format)[1]','varchar(30)' ) as format ,xm.value('(/item/@description)[1]','varchar(30)' ) as description
from #t where id = 3
and xm.value('(/item/@description)[1]','varchar(30)' ) like '%音频%'
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号