sql-server - 在 SQL Server 结果中查询 XML 的问题
问题描述
我需要一些帮助 - 我有这个 XML
DECLARE @xml XML;
SELECT @xml = (SELECT TOP(1) codigo, Numero, fecha, transportista, chofer
FROM @tbl
FOR XML PATH(''), TYPE, ROOT ('root'));
SELECT
@xml.query('<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <CrearViaje4 xmlns:unis="http://unisolutions.com.ar/">{for $x in /rootreturn $x/*}</CrearViaje4></soapenv:Body></soapenv:Envelope>');
在行中<CrearViaje4 xmlns:unis="http://unisolutions.com.ar/">
我只需要<CrearViaje4 xmlns="http://unisolutions.com.ar/">
但如果我删除:unis
当我执行我的句子时,它不显示信息
解决方案
推荐阅读
- python - 配对 Numpy 数组中的相邻值
- julia - 在项目虚拟环境中添加包时 Pkg.precompile 错误(Julia)
- database - 如何在flutter sqflie中保存当前日期和时间?
- r - 创建几何序列
- flutter - Flutter Listview builder 根据“索引”为奇数或事件在两行中显示数据
- android - Kotlin:在非活动类/计算中使用 SUM 查询的 Room DB
- scheduler - AUTOSYS:同时获取多个作业的作业状态的命令
- python - 如何在 Flutter 和 django 中创建视频会议?
- python - 我如何在不同的坐标上对多个相同的图像进行 blit?
- java - 删除循环链表的尾部元素