The easiest and fastest way to create ad hoc reports from SQL Server
Got a SQL Server or .NET question? Discuss it in the forums. (SQL Server Forums | Dot NET Forums)
First Time? You can support us by signing up. It takes only 5 seconds. Click here to sign up. If you already have an account, click here to login.

June 2008 - Posts

XQuery Lab 5 - Working with Namespaces

Working with Namespaces is little more tricky. The following code shows an example that queries values from an XML document, having namespace declaration. Note the usage of WITH NAMESPACES which resolves the namespace references. Note also the usage of...
by Jacob Sebastian on 06-30-2008 | 706 Views

XQuery Lab 4 - Joining XML Nodes with a Relational Table

Recently some one asked me if we could join XML nodes with a relational table. The answer is YES. I wrote a quick sample that demonstrates this. Here is an example. DECLARE @t TABLE (EmpID INT , EmpName VARCHAR (20)) INSERT INTO @t (EmpID, EmpName) SELECT...
by Jacob Sebastian on 06-27-2008 | 1,013 Views

XQuery Lab 3 - Filtering specific nodes

Sometimes we need to apply a filter on the nodes of an XML document and retrieve only those nodes that meet a specific criteria. Most of the times, such filters will be applied on a given attribute value of the specific element. Here is such an example...
by Jacob Sebastian on 06-26-2008 | 1,211 Views

XQuery Lab 1 - Transforming rows to columns

This is the first of a series of XQuery posts I plan to write under the ‘XQuery Labs’ series. The purpose of this series is to demonstrate the usages of XML Data type methods and XQuery functions. Input I have an XML document which looks like the following...
by Jacob Sebastian on 06-26-2008 | 2,218 Views

XQuery Labs - A Collection of XQuery Sample Scripts

I have always experienced and am convinced that, while learning a programming technique, it is more helpful to see an example that matches our specific requirement, rather than some theoretical stuff. Examples are really good for learning the basics and...
by Jacob Sebastian on 06-26-2008 | 16,892 Views

XQuery Lab 2 - An example using OUTER APPLY

This example has an XML document with a bit complex node structure. The XML document has 3 <Pupil> elements and each of those elements has several child elements. If you have a closer look into the XML structure you could see that, not all the child...
by Jacob Sebastian on 06-25-2008 | 1,163 Views

Copyright © Beyondrelational.com