Posts Tagged “XML”
Imagine you have a list of unrelated items in your .NET application, and you need SQL Server to do something for each one. For example: A customer has a shopping cart containing a list of 10 product IDs. The shopping cart is stored in ASP.NET session memory on the web server. How can you retrieve [...]
During my foray into XML SQL queries this week, I was presented with another challenge. Instead of getting just the immediate children of a category, I now needed to recursively select all children from a tree – to an unlimited depth. A Common Table Expression (CTE, aka WITH statement) can also be called recursively, but [...]
Today, while doing some work on a highly data (not object) driven .NET application, I needed a query output as XML from the application’s SQL Server 2005 database. I wanted: Nicely formatted and properly mapped XML (e.g. no <row> elements as found in FOR XML RAW mode) To be able to easily map columns to [...]


