February 18, 2004 01:18 PM

Using the sql:key-fields Annotation

Introduce order to your XML Views
Rating: (0)
SQL Server Magazine
InstantDoc ID #41651
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:

NOT A PROFESSIONAL MEMBER? YOU CHOOSE:

Professional Membership

Monthly

Annual

VIP Membership

Monthly

Annual

Add a Comment

There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
GOOGLE LINKS
SPONSORED LINKS
FEATURED LINKS