(teohster@gmail.com) writes:[color=blue]
> I am trying to produce XML like the first one I described and have yet
> to discover a way of associating the ChildRegister with the parent
> Device in XML. I am not sure if it is a limitation of SQL Server, or if
> my implementation is incorrect. If anyone could post hints or
> solutions, I would greatly appreciate it.
> A shortened version of the stored procedure is below[/color]
For all problems like this, it is a good idea to post:
o CREATE TABLE statements of the tables inolved.
o INSERT statements with sample data.
o The desired output given the sample data.
You posted the last, but not the first two.
This permits people to post a tested solution to your query. In this
case, an aggrevating factor is that I am not extremely versed in XML,
so I would have to play around with the query.
It may be more effective to ask the real pros in
microsoft.public.sqlserver.xml though.
--
Erland Sommarskog, SQL Server MVP,
esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp