title: TO_CHAR(number) Function returns ORA-01722: invalid number
body: <p>Query:<br>
  <code>Select To_Number(qty) From my_table Where Id=12345;</code><br>
  Output:<br>
  <code>ORA-01722: invalid number<br>
  01722. 00000 -  "invalid number"</code>  </p>
  
  <p>Query: <code>Select qty From my_table Where Id=12345;</code><br>
  Output: <code>0.00080</code>  </p>
  
  <p>Query:<br>
  <code>Select To_Number(0.00080) From Dual;</code><br>
  Output:<br>
  <code>0.00080</code> (no error)  </p>
  
  <p>This is a odd situation I am facing in Oracle. Can anybody suggest why it happens? The column <code>qty</code> is <code>NUMBER</code> type. Hence it is very hard to imagine that it contains invalid number, but it happened.<br>
  I want to clarify that it happened for the specific value in the column although we have thousands of records in the same column.<br>
  Added more: The same error appears if I use <code>TO_CHAR(qty)</code> function. The <code>qty</code> column is <code>NUMBER</code> type not <code>VARCHAR2</code>. In fact we are using <code>SUM(qty)</code> function which showed error. Hence I went for a dissection and found this row being the culprit.</p>