title: Most Efficient Way to Return Y/N If One or More Columns Contain Non-Null Value?
body: <p>What is the most concise way to return CHAR(1) indicator Y/N if one of <em>n</em> columns in a row contain a non-null value?</p>
  
  <p>Performance is important, but not the primary consideration, in this case.</p>
  
  <p>The straightforward way seems to be:</p>
  
  <pre><code>SELECT      CASE WHEN (C.TerminatedDate IS NULL
                         AND C.SelfClosedDate IS NULL
                         AND ...)
                   THEN 'Y'
                   ELSE 'N' END AS 'OpenInd'
  
    FROM      Customers C
  </code></pre>
  
  <p>Curious if there is a better way; aware of COALESCE():</p>
  
  <pre><code>SELECT      CASE WHEN COALESCE (C.TerminatedDate, C.SelfClosedDate, ...) IS NULL
                   THEN 'Y'
                   ELSE 'N' END AS 'OpenInd'
  
    FROM      Customers C
  </code></pre>
  
  <p>Is there a better way?</p>
  
  <p>Database server is SQL Server 2008.</p>