code_junkie

How to delete all comments from XML using XQuery on SQL Server 2005

Nov 14th, 2011
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. select @XML.query('comment()')
  2.  
  3. set @XML.modify('delete comment()')
  4. select @XML
  5.  
  6. UPDATE Store SET Demographics.modify('delete //newnode') WHERE CustomerID = @custid
Add Comment
Please, Sign In to add comment