Splitting Amount Using Comma In Oracle
In oracle i need to split amount using comma such as 10,000 and 1,00,000 whatever it comes. I need to split this. Is there any solution available for this. Am stuck with this. my r
Solution 1:
Use TO_CHAR and desired number format.
SQL>with data(num) as(
2select100from dual union3select1000from dual union4select10000from dual union5select1000000from dual
6 )
7SELECT TO_CHAR(num, '9,999,999') FROM data;
Also, in SQL*Plus there is a default number format. You could set numformat as per your desired format:
SQL>set numformat 9,99,999SQL>SELECT100000FROM DUAL;
100000---------1,00,000
TO_CHAR(NU
----------1001,00010,0001,000,000
Post a Comment for "Splitting Amount Using Comma In Oracle"