2
如何檢索MS SQL中的XML字段中的字段?如何從SQL XML查詢中選擇標籤?
每當我使用此XML代碼時,我嘗試的每個查詢都無法正常工作: 我想選擇AccNumber值。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<AuthSoapHd xmlns="https://temp.uri.com/Mngmt/">
<System>System1</System>
</AuthSoapHd>
</soap:Header>
<soap:Body>
<PrintList xmlns="https://temp.uri.com/Mngmt/">
<Account>
<AccNumber xmlns="https://temp.uri.com/Project/Object/Data">990368644</AccNumber>
</Account>
</PrintList>
</soap:Body>
</soap:Envelope>
我嘗試以下的多個varations沒有sucess
Select [RequestXML].query('/Envelope/Body/PrintList/Account/AccNumber')
FROM [dbo].[Table1]
你有沒有嘗試用soap添加信封和身體:? – Fosco 2010-07-29 19:58:30