title: Copy data from one table to another AND set fixed values?
body: <p>I'm using the following SQL statement to copy data from TableA to TableB.</p>
  
  <pre><code>INSERT INTO TableB (url, pageViews)
  SELECT DISTINCT TOP(5) url AS url, SUM(HitCount) As pageViews
  FROM TableA
  WHERE (url LIKE '%www%site') AND (YEAR(dtDate) = 2011) AND (MONTH(dtDate) = 1)
  GROUP BY url
  ORDER BY pageViews DESC
  </code></pre>
  
  <p>At the moment, this works great at putting the url and pageViews data into TableB as below (Please ignore the dots - that was for formatting everything in line to look like a table!).  </p>
  
  <hr>
  
  <pre><code>|URL            | pageViews     | ranking
  
  |www.site.com   | 25220         | NULL
  
  |www.site.com/a | 25230         | NULL
  
  |www.site.com/b | 25433         | NULL
  </code></pre>
  
  <hr>
  
  <p>But the ranking column is NULL.  For each row I'm bringing across from TableA, I'd like to set the value of the ranking column (which only exists in TableB) to be "Top5" as below:</p>
  
  <hr>
  
  <pre><code>|URL            | pageViews     | ranking
  
  |www.site.com   | 25220         | Top5
  
  |www.site.com/a | 25230         | Top5
  
  |www.site.com/b | 25433         | Top5
  </code></pre>
  
  <hr>
  
  <p>I'd be very grateful for any help on this.</p>
  
  <p>Many thanks :)</p>