This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
A pottery rib shapes a clay vessel beside a trimmed clay strip and a newly attached clay handle

XML modify(): Inserting, Replacing and Deleting Nodes

May 11, 2012
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Table Operation, SQL Variable, SQL XML

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.

Read More
An oyster knife opens one shell beside a row of shells whose meat still needs separate access

Plan Cache Key Lookups: Finding the Worst Ones With XQuery

March 24, 2012
Pinal Dave
SQL Performance
Execution Plan, SQL Cache, SQL Index, SQL XML

Not every key lookup needs fixing. Rank statements by reads, find the lookups with XQuery, then test the smallest index change on one call.

Read More
A set of nested wooden boxes opened on a table, the smallest innermost box painted red.

XML Data Type Quiz: Which Method Returns a Plain Value?

January 21, 2012
Pinal Dave
SQL Puzzle
SQL Datatype, SQL Function, SQL XML

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.

Read More
Two groups of blue ceramic beads on terracotta and sage cloths beneath an unmarked wooden tool.

XML Namespaces: Match the Namespace URI, Not Just the Tag

September 12, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL XML

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.

Read More
A detached ceramic lid beside an empty pale cup and a blue cup holding a stone on sage cloth.

FOR XML XSINIL: Emit Missing Fields as Explicit Nil Elements

August 10, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL XML

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.

Read More
Save As dialog box.

SQL SERVER – View XML Query Plans in SSMS as Graphical Execution Plan

July 3, 2010
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Scripts, SQL Server Management Studio, SQL XML

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.

Read More
SQLAuthority News - Guest Post - SELECT * FROM XML - Jacob Sebastian

SQLAuthority News – Guest Post – SELECT * FROM XML – Jacob Sebastian

June 23, 2010
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL XML

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.

Read More
Previous 1 2 3 4 5 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com