Running XQuery over multiple XML datatype instances

One of the limitations of using XQuery inside SQL Server 2005 is that you are limited to running your expressions over a single XML data type instance. It is usually possible to insert your XML into the database so that this is not a problem (e.g. placing all the XML data you want to query…

1

Using WITH XMLNAMESPACES

My fellow Microsoft Mike (Michael Rys) has just posted an article on his blog highlighting the use of the new T-SQL with xmlnamespaces syntax. This syntax allows you to simplfy your XQuery statements by defining namespaces in the T-SQL world and having them available to all the XQuery expressions in the statement. The new WITH…

2

Analyzing the Static Type of your Query

XQuery inside SQL Server 2005 implements a set of rules that enable us to catch potential problems with the user query at compile time, based on static analysis of the query. The complete rules for static analysis of XQuery expressions are detailed in the various XQuery language and implementation documents. Basically, static typing leverages information…

4

Using SQL datetime and smalldatetime values inside XQuery

I had a request today asking me how to get the current date/time as part of an XQuery expression in SQL Server 2005. The XQuery standard defines various functions to do this type of action, but unfortunately, SQL Server 2005 XQuery does not support these 🙂 Rather, you need to get the date/time values from a T-SQL…

9

Welcome!

Welcome to my blog dealing with using XQuery inside of SQL Server 2005. As an introduction to the kind of information I intend to populate this blog with, I have started off writing an atricle on how to take the examples from the XQuery Use Case documents, and convert them to execute against SQL Server…

1

Converting XQuery Use Case Queries to Execute Inside SQL Server 2005

The following is a simple walk-through for converting some of the standard queries from the W3C XML Query Use Cases working-draft document so they can be executed against SQL Server 2005. I chose to use queries from section 1.9 of the use cases document as these deal with strongly typed data and give me the…