Have you ever built an XML View in SQL Server 2000, then executed a query and received an XML result that seemed to contain all the right data, but some elements had no children and others had too many? I run into this problem every now and then when I forget to specify primary keys for the tables I use in the XML View. Fortunately, this problem is easy to fix once you recognize what's happening. This month, I describe a common scenario in which this ordering problem occurs, explain why it happens, and show you how to fix the problem. But first, let's review how XML Views work.
...This article is for paid Professional Members only.
Already a Professional Member? Please log in now: