Sql Queries:How to convert number into words in oracle using sql query

How to convert number into words in oracle using sql query


select  to_char(to_date(4321,'J'), 'JSP') as word from dual;


Output-FOUR THOUSAND THREE HUNDRED TWENTY-ONE


select  to_char(to_date(123,'J'), 'JSP') as word from dual;


Output-ONE HUNDRED TWENTY-THREE


Above query works only for numbers from 1 to 5373484.


select  to_char(to_date(5373485,'J'), 'JSP') as word from dual;

Output-We get error as "julian date must be between 1 and 5373484"

No comments:

Recent Posts