XQuery を使用して XML ノードの内部テキストを選択するにはどうすればよいですか?
Microsoft Books Online は、以下の属性を取得する方法を示しています。
DECLARE @myDoc xml
DECLARE @ProdID int
SET @myDoc = '<Root>
<ProductDescription ProductID="1" ProductName="Road Bike">
<Features>
<Warranty>1 year parts and labor</Warranty>
<Maintenance>3 year parts and labor extended maintenance is available</Maintenance>
</Features>
</ProductDescription>
</Root>'
SET @ProdID = @myDoc.value('(/Root/ProductDescription/@ProductID)[1]', 'int' )
SELECT @ProdID
保証ノードの内部テキスト値を取得するにはどうすればよいですか?