title: SQL SUM CASE STATEMENT
body: <p>I have:</p>
  
  <pre><code>SUM
  (
  case
  when LC.[DWC] = 0 and LC.BI = 1 then 1
  else LC.[DWC] END AS DC
  ) 
  AS [DWC]
  </code></pre>
  
  <p>But I am getting an error message:</p>
  
  <blockquote>
    <p>'SUM' is not a recognized built-in function name.</p>
  </blockquote>
  
  <p>How can I fix this?</p>