title: Use function in Sql column header
body: <p>I wanted to know if it's possible to use a calculated function as a column header. Please see my code below. I would like to use yesterday's date for the sum case column header.</p>
  
  <pre><code>DECLARE @A AS VARCHAR(12)
  SET @A = GETDATE()-1
  
  select Data,  
      sum(case when DATEDIFF(DAY, Dt, GETDATE()) = 1and Type = 'Stock'
      then Spend end) AS  @A
  from dbo.vw_ZZ_AS_ComplianceLeagueTable
  group by Data
  </code></pre>