title: Declaring XML in SQL Server issue
body: <p>I have a T-SQL issue, I am trying to do the following and I receive an error message when I try to run the <code>SELECT</code> statement, saying that I didn't declare the <code>@Xml</code> variable, any help would be appreciated, thanks.</p>
  
  <pre><code>DECLARE @Xml XML = N'
   &lt;products&gt;
   &lt;product id="1" name="Adjustable Race" /&gt;
   &lt;product id="879" name="All-Purpose Bike Stand" /&gt;
   &lt;product id="712" name="AWC Logo Cap" /&gt;
   &lt;product id="19910" name="Cozonac" /&gt;
   &lt;/products&gt;';
  
  SELECT 
      xt.xc.value('@id', 'INT') AS ProductID,
      xt.xc.value('@name','NVARCHAR(50)') AS Name
  FROM 
      @Xml.nodes('/products/product') AS xt(xc);
  </code></pre>