English 中文(简体)
选取所有Xml 不包括单一特定代号服务器
原标题:Select all xml exclude a single specific node SQL Server

我有一个一栏,用服务器Xml数据类型储存Xml。 此外,我还有一个Xpath问询,可以从我想要去的xml中挑选单一噪音。 因此,我的问题是,在EXCEPT一栏中,是否选择了需要删除的单项具体指标Im? 我可以选择我想要去除的 no子,但我无法找到办法,把它从其他 x子中去除,留下一切照旧。 如果任何人能够就如何利用SQ服务器Xml的功能向我提供任何指导,将非常感谢。

最佳回答

你可以这样做:

DECLARE @xml XML
SELECT @xml = YourXmlField
FROM YourTable
WHERE ID = 1

SET @xml.modify( delete /Root/A )
SELECT @xml

因此,你需要将这一数值纳入XML变量,并用修改来删除该节点,使节点能够删除。

问题回答

暂无回答




相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签