title: Converting column value from varchar to integer in PostgreSql
body: <p>I would like to return all rows where the sv column, a varchar, is greater than 40. How can I convert sv to an integer on the fly.
  The line below returns ERROR:  invalid input syntax for integer: &quot;SV&quot;</p>
  <pre><code>SELECT namefirst, namelast, yearid FROM pitching JOIN people ON pitching.playerID = people.playerID WHERE CAST(sv AS INTEGER)&gt;40;
  </code></pre>