title: Sql Server - Alternative of doing a RTRIM/LTRIM in the where clause
body: <p>I hava a column name which is a varchar</p>
  
  <p>I want to filter all results where name is an empty string...</p>
  
  <pre><code> select name 
   from tblNames
   where name &lt;&gt; ''
  </code></pre>
  
  <p>What I want to do is:</p>
  
  <pre><code> select name 
   from tblNames
   where Ltrim(RTrim(name)) &lt;&gt; ''
  </code></pre>
  
  <p>I want to apply a trim on name in the where clause but I have read a few articles mentioning the performance issue of functions inside the where clause </p>
  
  <p>I want a solution to this without hurting performance</p>