1
XQueryを使用してXMLノードの内部テキストを選択するにはどうすればよいですか?SQL Server 2005でXQueryを使用してXMLの内部テキストを取得する
マイクロソフトオンラインブックの下に属性をretriveする方法を示しています。
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
はどのように保証ノードの内部テキスト値を取得するのでしょうか?