title: format a lengthy number with commas in Oracle
body: <p>I have a requirement to convert the very lengthy amount to a <code>comma separated value in oracle</code>. I was searching in google. but I got some solutions which works only for small numbers. But not for lengthy number. Below is the solution I have. But not working properly. I was getting <code>############</code>... if I run the below. </p>
  
  <pre><code>SELECT TO_CHAR(6965854565787645667634565432234565432345643265432345643242087,
  '99G999G999G9999', 'NLS_NUMERIC_CHARACTERS=",."') as test
  FROM dual;
  </code></pre>
  
  <p><strong>Desired output:</strong></p>
  
  <p><code>6,965,854,565,787,645,667,634,565,432,234,565,432,345,643,265,432,345,643,242,087</code></p>
  
  <p>Please help me. thanks in advance.</p>