title: CAST a column contain empty cells, NULL and String to FLOAT64 in BigQuery
body: <p>I am encountering a problem with casting strings to float that I haven't been able to solve. I have a column in a BQ table contain values (numbers as string), NULLs adn empty cells. Now, I want to CAST the values to FLOAT64 but I get a double value error. I tried:</p>
  <pre><code>CAST(myfield AS FLOAT64) as myfield
  </code></pre>
  <p>and thinking it might help to replace empty field by NULL:</p>
  <pre><code>CAST(REGEXP_REPLACE(myfield, &quot; &quot;, NULL) AS FLOAT64 ) as myfield
  </code></pre>
  <p>But this sets everything to NULL.</p>
  <p>Any idea on how to solve this would be greatly appreciated.</p>