SiSense BI Evolved
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.

FOR XML PATH – Yet another shaping example using FOR XML PATH

One of my readers recently contacted me with an XML shaping requirement. He wanted to generate an XML document with a specific structure from a result set that he has created. Here is the source data. RootNode ParentNode Node Name Number Valid Value ...

FOR XML PATH - Generating an element having NULL value

When you generate an XML document using FOR XML, columns having NULL value will be eliminated. Some times you might need to have an empty element (even if there is no value) generated to make sure that the application that processes the XML document does...

FOR XML PATH - How to generate a Delimited String using FOR XML PATH?

One of the two common string operations that we do often are 'parsing' delimited strings and 'generating' delimited strings. This post explains how to generate a delimited string using FOR XML. I like XML and many of you might have noted...

FOR XML PATH - How to remove the <row> element from the output of a FOR XML PATH query?

When you write a simple FOR XML query with PATH, you will see that a <row> element will be generated for each row in the result set. For example: DECLARE @t TABLE (Name VARCHAR (10)) INSERT INTO @t (Name) SELECT 'Jacob' INSERT INTO @t (Name...

Another XML Shaping Example - using FOR XML PATH and EXPLICIT

In many of the previous posts, we discussed about controlling the structure of the XML being generated with FOR XML. SQL Server 2005 introduced the PATH operator which provides a great extend of control over the shaping of the XML being generated. With...

Copyright © Beyondrelational.com