title: error converting varchar to float
body: <p>Getting an error converting varchar to float. </p>
  
  <p>Have a table (not of my making) with column <code>result</code>, having varchar data. I'd like to convert to float to grab all values > 180.0. </p>
  
  <pre><code>SELECT result FROM table WHERE result &gt; 180.0
  </code></pre>
  
  <p>Produces the error. Interestingly, though:</p>
  
  <pre><code>WITH temp AS (
    CASE
      WHEN ISNUMERIC(result)=1 THEN CAST(result as FLOAT)
      ELSE CAST(-1.0 AS FLOAT)
    END AS result
  )
  </code></pre>
  
  <p>This runs fine. When I pair it with:  </p>
  
  <pre><code>SELECT temp.result FROM temp WHERE temp.result &gt; 180.0
  </code></pre>
  
  <p>I get the error again. Thoughts? </p>
  
  <p>UPDATE: Full code Requested...</p>
  
  <pre><code>WITH temp AS (
    SELECT
    CASE
      WHEN ISNUMERIC(result)=1 THEN CAST(result as FLOAT)
      ELSE CAST(-1.0 AS FLOAT)
    END AS result
    FROM table)
  
  SELECT temp.result FROM temp WHERE temp.result &gt; 180.0
  </code></pre>
  
  <p>Using SQL-SERVER 2008 RC2.  </p>