抄来的别人总结的一段,为什么出错呢?
我不要昵称 2012-11-06 10:03:12 DECLARE @myDoc XML
SET @myDoc = '<Root>
<ProductDescription ProductID="1" ProductName="Road Bike">
<Features> </Features>
</ProductDescription>
</Root>'
DECLARE @NewFeatures XML
SET @NewFeatures = N'<ride>people could ride bike</ride>
<sport>ride bike is a sport</sport>'
SET @myDoc.modify('
insert sql:variable("@NewFeatures")
into (/Root/ProductDescription/Features)[1]')
SELECT @myDoc;
这一段怎么在SQL2005中运行出错啊?
消息 6739,级别 16,状态 1,第 13 行
XQuery: 在 XQuery 中不支持 SQL 类型 'xml'。