易截截图软件、单文件、免安装、纯绿色、仅160KB

怎么根据xml列中的值来筛选

crate table test(col1 int,col2 xml)

select * from test where col2.query('/root/a[@b="true"]')

意思是这个意思 该怎么写
exists
?

select * from test where col2.exist('/root/a[@b="true"]')


???

select * from test where exists(select col2.query('e/b[@o="true"]') from test)

出来结果不对,出来的是全部行

xquery  --->exist()

引用
crate table test(col1 int,col2 xml)

select * from test where col2.query('/root/a[@b="true"]')

意思是这个意思 该怎么写


SQL code:
where col2.exist('/root/a/@b[. eq "true"]')=1

where col2.exist('/root/a/@b[xs:boolean(.) eq true()]')=1


谢谢,


相关问答:

如何将XML数据存入ACCESS数据库

请问各位大师,我现在需要将XML的数据实时的存入到数据库中,我是用asp编的程序,大量们帮忙分析 一下!!!
下面是我的XML文件代码
XML code:

<?xml version="1.0" encoding="utf-8"? ......

VS中xml文件的中英文显示颜色不一样?

<?xml version="1.0" encoding="gb2312" ?>
<sites>
<site>
<name>.Net开发者园地</name>
<url>http://dotnet.aspx.cc</url>
<img&g ......

setTextContent编辑XML文件内容没变化

Java code:
/**
* 设置指定的元素名和节点索引所对应节点的内容
* @param 元素名
* @param 节点索引
* @param 内容
*/
public void setElementContent(String elementName,in ......

C# 语法导出XML 的编码设置

我现在做接口导出,.NET平台,开发语言C#,想导出XML的文本格式。
想得到 <?xml version="1.0" encoding="GBK"?> 
的编码格式!怎么设置?谢谢!急!


只要保存为xml格式, ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号