title: SQL upper/lower + substring not working well
body: <p>I have a table with a column named "name" between other columns. I was making experiments with sql functions and I don't know why this doesn't work. When I run this code:</p>
  
  <pre><code>select name , upper(SUBSTRING(name,1,1)), SUBSTRING(name,1,1) from primeraTabla
  </code></pre>
  
  <p>I get a table like:</p>
  
  <pre><code>name     (no column name)    (no column name)
  paco     P                   p
  Fernando F                   F
  ....
  </code></pre>
  
  <p>But when I try:</p>
  
  <pre><code>select * from primeraTabla where upper(SUBSTRING(name,1,1)) = SUBSTRING(name,1,1)
  </code></pre>
  
  <p>the first row with name paco should be excluded, but it is not. The filter doesn't work.</p>
  
  <p>So the question is, why this filter doesn't work?</p>