title: SQL Select ONLY Non-Empty Columns
body: <p>I have 25 columns in a SQL Server 2008 table and I ONLY AND ONLY need to select the cells which are not empty. So far I have tried the <code>Where</code> condition like:</p>
  
  <pre><code>Select * 
  from TableNmae 
  where ColumnA is not like '% %' 
    and  ColumnB is not like '% %' ,etc...
  </code></pre>
  
  <p>And I also tried the <code>Union</code> and <code>Union All</code> for all the columns but non of them returns only the non-empty cells for a given condition.</p>