Tuesday 15 May 2012

sql server - How to merge XML in T-SQL? -


It does not appear that any amount in reading the docs will help me look at the simplified example:

 declare @ table 1 table (id int, parent xml) @ table1 value (1, 'root & gt; & lt; / root & gt;') @ table2 Announce the table Id int, Guts xml) Type @ table1 t1 from Inner Invert @ Table 2 T2 on t1 @ Table 2 Values ​​(1, ' O Mom! & Lt; / Guts & gt;') Select t1.parent .query ('') id = t2.id  

What is the query function to generate this result? Will be ridden?

  & lt; Root & gt; & Lt; Guts & gt; Hey Mom! & Lt; / Dare & gt; & Lt; / Root & gt; The following is not set based, but it will help you (SQL2008 only)  


No comments:

Post a Comment