Querying XML in SQL

This is one of the most useful (yet underused) data query techniques I have come across whilst using SQL server

Storing application objects as XML in a SQL Server database is one of the most flexible ways of logging/archiving data used in web processes, incoming interface jobs, and populated schemas for printing/invoicing etc; and when there are no restriction on table sizes, this method of storage and retrieval is a god send

The underlying reason for this post is the fact that I rarely have to use these queries anymore as I am only dealing with logging or archiving with XML and tend to forget the syntax! Continue reading