これは私の問題です:列内の次のXMLから、名前が 'Enabled'の変数の値がステップIDの「Yes」に等しいかどうかを知りたいコンポーネントIDとを含む。SQL XML値を取得するためのXPath
'<xml>
<box stepId="1">
<components>
<component id="2">
<variables>
<variable id="3" nom="Server" valeur="DEV1" />
<variable id="4" nom="Enabled" valeur="Yes" />
</variables>
</component>
<component id="3">
<variables>
<variable id="3" nom="Server" valeur="DEV1" />
<variable id="4" nom="Enabled" valeur="No" />
</variables>
</component>
</components>
</box>
<box stepId="2">
<components>
<component id="2">
<variables>
<variable id="3" nom="Server" valeur="DEV2" />
<variable id="4" nom="Enabled" valeur="Yes" />
</variables>
</component>
<component id="3">
<variables>
<variable id="3" nom="Server" valeur="DEV2" />
<variable id="4" nom="Enabled" valeur="No" />
</variables>
</component>
</components>
</box>
</xml>'
「@ x」とは何ですか? * –
DECLARE @x XML =(質問からのXML); がSQL Serverのクエリウィンドウ内の彼のステートメントの上にあると思われます。それは重複していたので答えます。言い換えれば、それは質問からのXMLを含む変数であると思われます。 – sirdank