title: How to insert xml into a node in another xml using XQuery?
body: <p>I have two xml variable say @res, @student in a stored proc in SQL server 2005. </p>
  
  <p>@res contains </p>
  
  <pre><code>&lt;Subject&gt;English&lt;/Subject&gt;
  &lt;Marks&gt;67&lt;/Marks&gt;
  &lt;Subject&gt;Science&lt;/Subject&gt;
  &lt;Marks&gt;75&lt;/Marks&gt;
  </code></pre>
  
  <p>@student contains:</p>
  
  <pre><code>&lt;Student&gt; 
     &lt;Name&gt;XYZ&lt;/Name&gt;
     &lt;Roll&gt;15&lt;/Roll&gt;
     &lt;Result /&gt;
     &lt;Attendance&gt;50&lt;/Attendance&gt;
  &lt;/Student&gt;
  </code></pre>
  
  <p>I need to insert the xml of @res into the node <strong>Result</strong> in @student variable using XQuery.</p>
  
  <p>How to implement that?</p>
  
  <p>Please help.</p>