title: Oracle round varchar2 column to 2 decimal places
body: <p>I have a varchar2 column that i need to get an average number from.</p>
  
  <p>So take the following table where val is a column varchar2(20):</p>
  
  <pre><code> val
   5
   4.654645
   3.4534353
  </code></pre>
  
  <p>I have tried the following:</p>
  
  <pre><code>select ROUND(AVG(TO_NUMBER(val)),2) as n from table
  </code></pre>
  
  <p>The result i am getting is 1.9110E+13</p>
  
  <p>The result i want is a number rounded to 2 decimal places</p>
  
  <p>Thanks in advance for any help</p>