I am a beginner in XML with SQL. How can I specify index within an insert statement as below. The following statement gives throws exception with invalid path to update.
Did you check out this article. http://technet.microsoft.com/en-us/library/ms175466.aspx
SELECT @myDoc
set @myDoc.modify('
insert Strong long lasting
after (/Root/ProductDescription/Features/Material)[1]
')
SELECT @myDoc;
This assumes that the Material tag exists. Is the path (/xyz/abc) valid?
1 year parts and labor
3 year parts and labor extended maintenance is available
Aluminium
Strong long lasting
Also, test you current code with a literal instead of a sql:variable.
Again, please post the xml/code.
Thanks
John