从xml变量sql获取值
您好,我正在使用SQL,并且在变量中有以下值从xml变量sql获取值,sql,xml,xsd,sqlxml,Sql,Xml,Xsd,Sqlxml,您好,我正在使用SQL,并且在变量中有以下值 <needs xsi:noNamespaceSchemaLocation="../../../../docs/xsd/rx/i2.0/needs-i2.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Method qid="String" isApplicable="true" location="needs" source
<needs xsi:noNamespaceSchemaLocation="../../../../docs/xsd/rx/i2.0/needs-i2.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Method qid="String" isApplicable="true" location="needs"
source="needs">
<Yes>false</Yes>
<No>true</No>
</Method>
<S_Needs qid="String" isApplicable="true" location="needs"
source="needs">
<N_Value type="String" id="String" from="String"> NEED THIS VALUE </N_Value>
</S_Needs>
<Testing qid="String" isApplicable="true" location="needs"
source="needs">
<Yes>false</Yes>
<No>false</No>
<Defaults>true</Defaults>
</Testing>
</needs>
假的
真的
需要这个值吗
假的
假的
真的
路线是需要,S_需要,N_值我需要N_值我怎么能得到这个值
select @XML.value('(/needs/S_Needs/N_Value/text())[1]', 'nvarchar(max)')