Viewing 4 posts - 1 through 4 (of 4 total)
Great Eirikur,
didn't think about that 😉
Now it works as I want.
Thank you
For those interested :declare @head1 table
(head_id uniqueidentifier)
June 26, 2018 at 7:25 am
Maybe interesting to note that the 'for xml' statements are not allowed/supported inside union all queries
June 26, 2018 at 6:39 am
Alas, the resutl I get then is thi<master>
<alldata head_id="6DBD64CD-44CE-425C-A105-BE1900299550">
<sub>
<own_id>10</own_id>
<own_field>Sub1 field</own_field>
<own_id>11</own_id>
...
June 26, 2018 at 6:37 am
Sure,
This is what the quey returns now :
<master>
<alldata head_id="C6DF494E-4DA7-4726-8288-BB463CB96834">
<sub>
<sub>
<own_id>10</own_id>
<own_field>Sub1 field</own_field>
</sub>
<sub>
...
June 26, 2018 at 5:25 am
Viewing 4 posts - 1 through 4 (of 4 total)