The modify() method edits XML in place, but a path that matches nothing changes nothing and says nothing. Here is how to stay in control.
Plan Cache Key Lookups: Finding the Worst Ones With XQuery
Not every key lookup needs fixing. Rank statements by reads, find the lookups with XQuery, then test the smallest index change on one call.
XML Data Type Quiz: Which Method Returns a Plain Value?
This XML Data Type Quiz asks which xml method returns the customer name as an ordinary SQL value with a type you choose. The answer is value(). A tested script runs the methods on one order document and shows what each one returns.
XML Namespaces: Match the Namespace URI, Not Just the Tag
XML Namespaces are part of element identity, so a matching tag name alone can still miss a node. I compare three paths against one document. The namespace URI stays the same while the query binding changes.
FOR XML XSINIL: Emit Missing Fields as Explicit Nil Elements
FOR XML XSINIL can represent SQL NULL with an explicit element carrying the xsi:nil attribute. I compare that output with ordinary element omission. An empty string stays a separate input in both versions.
SQL SERVER – View XML Query Plans in SSMS as Graphical Execution Plan
Want to share a graphical execution plan? Save it as a .sqlplan file and send it. Anyone can open it in SSMS without the tables or indexes behind it.
SQLAuthority News – Guest Post – SELECT * FROM XML – Jacob Sebastian
Getting NULL when reading a value from XML? Most of the time the XPath expression is wrong. A guest post by Jacob Sebastian on writing it correctly.







