title: SQL SELECT ... IN(xQuery)
body: <p>My first xQuery, may be a bit basic, but it's the only time I need to use it at the moment)  </p>
  
  <pre><code>DECLARE @IdList XML;
  
  SET @IdList =
  '&lt;Ids&gt;
      &lt;Id&gt;6faf5db8-b434-437f-99c8-70299f82dab4&lt;/Id&gt;
      &lt;Id&gt;5b3ddaf1-3412-471a-a6cf-71f8e1c31168&lt;/Id&gt;
      &lt;Id&gt;1da6136d-2ff5-44cc-8510-4713451aac4d&lt;/Id&gt;
  &lt;/Ids&gt;';
  </code></pre>
  
  <p>What I want to do is:</p>
  
  <pre><code>SELECT * FROM [MyTable] WHERE [Id] IN ( /* This list of Id's in the XML */ );
  </code></pre>
  
  <p>What is the desired way to do this?  </p>
  
  <p>Note:  The format of the XML (passed into a Stored Procedure from C#) is also under my control, so if there is a better structure (for performance), then please include details.</p>
  
  <p>Also, there could be 1000's of Id's in the real list if that makes a difference..</p>
  
  <p>Thanks
  Rob</p>