title: Oracle Select query doesnt return any results when using trim on char(2) column and database field has only spaces
body: <p>Oracle Select query is not returning any results when using trim on char(2) column. The database field has only spaces. However, when the field has a space and a character, I get the correct results.</p>
  
  <p>e.g.</p>
  
  <pre><code>Action_code char(2)
  
  val = " 8"
  Select * from abc where trim(Action_code) = trim(val)
  </code></pre>
  
  <p>Here I get the rows having " 8".</p>
  
  <p>But,</p>
  
  <pre><code>val = "  "
  Select * from abc where trim(Action_code) = trim(val)
  </code></pre>
  
  <p>Here I don't get any rows from database where Action_code is "  ". But I have such rows in database.</p>
  
  <p>Can someone please help me how to get rows in 2nd case?</p>