title: concat column names with string inside a string
body: <p>I am trying to create a pretty column to display but I cannot get a space or hyphen to work. I want the column to display like </p>
  
  <p>Jun-2014 or Jun 2014  but I get errors when I try to insert it the normal way due to the query already being inside a string.</p>
  
  <p>Here is the part I am having trouble with:</p>
  
  <pre><code>(LEFT(DATENAME(month, leadtime),3) + " " + CONVERT(varchar, DATEPART(year, leadtime))) as leadmonth
  </code></pre>
  
  <p>And here is the rest of the query for context:</p>
  
  <pre><code>set @query = 'SELECT name AS "Lead Source",' + @cols + '
  from 
  (
  SELECT d.name, COUNT(u.lead_source_id) AS totalLeads, + "["+ (LEFT(DATENAME(month, leadtime),3) + " " + CONVERT(varchar, DATEPART(year, leadtime)))+"] as leadmonth" +
  FROM DI_TrackingDB.dbo.userleads u
  INNER JOIN GSPremiumServices.dbo.supplier_product_lead_source_def d ON d.lead_source_id = u.lead_source_id
  WHERE vend_id = 355135
      AND u.lead_source_id IS NOT NULL
  GROUP BY u.lead_source_id, d.name, DATENAME(month, leadtime), DATEPART(year, leadtime), Convert(varchar(7), leadtime, 126)
  ) x
  pivot 
  (
  max(totalLeads)
  for leadmonth in (' + @cols + ')
  ) p '
  </code></pre>
  
  <p>Please keep in mind I am setting <code>@query</code> so I am already inside of a string. 
  Any suggestions are appreciated.</p>