title: How to perform division in Hive with a Select statement
body: <p>I'm writing this in Hive.  I have a table that just holds one number.  I'll call the table that holds the number table_number and the actual number is <code>my_number</code>.</p>
  
  <p>In a different table that doesn't yet exist, I need to enter a decimal number that is <code>1/my_number</code>.</p>
  
  <p>I have tried <code>SELECT CAST((1/(SELECT my_number FROM table_number)) as double);</code>  I get a parse exception <code>"cannot recognize input near 'cast' '(' '('</code></p>
  
  <p>I've also tried <code>double(1/(SELECT my_number FROM table_number));</code>  I get another parse exception <code>"cannot recognize input near 'double' '(' 'Select'</code></p>
  
  <p>I'm at a total loss as to how to do this.  Can anyone give me some division examples that also use a select statement for one of the numbers?</p>