Srikanth Technologies

Converting Number to Words

I am providing a simple query in Oracle that returns words for the given number.

SQL> select  to_char( to_date(12345,'J'), 'JSP') from dual;


In the above query we first convert Number to Date using format J, which stands for Julian day. We use format JSP with TO_CHAR() to convert the given date to julian day and spell it as well.

Post Your Comment

Enter the code given in the above image :
Enter Your Name :
Enter Your Email Address :
Enter Your Comment :


Posted By chaitanya On 29-Jul-09 10:26:58 AM

Nice tip!

Posted By sudha On 29-Jul-09 02:42:29 PM

julian day, a very new term which i have learnt from this post sir.thanku sir.

Posted By praveen On 31-Jul-09 11:08:55 PM

very nice sir...
this will be very much useful in many of the applications and many of us dont know this function. Thanks for providing the tip through this blog..

Posted By Srikanth On 04-Aug-09 09:47:29 AM

Thank you sir. It is very simple and easy.

Posted By sampath On 24-Aug-09 08:36:57 PM

Really very nice tip. i do not no this before. thank you sir..... .we are excepting like these tips more in feature ....

Posted By Avinash On 30-Aug-09 03:44:03 PM

Julian Day (number of days since January 1 4713 BC, where January 1 4713 BC is 1 in Oracle)

JSP stands for Julian dates Spelled


Posted By Mani Kumar On 15-Oct-09 08:16:27 PM

Thank you sir.. for providing a useful query...

Posted By alekhya On 19-Oct-09 03:18:42 PM

its nice...thank u sir..

Posted By sanyasi naidu On 18-Nov-09 01:18:14 PM

nice information

Posted By roshan On 25-Nov-09 11:54:00 AM

hi there it is easy to know ths but there is another way to find gives some result wrong

Posted By k.nagarjuna On 05-Dec-09 09:28:27 AM

will it work in sql server.

Posted By lokanath On 29-Dec-09 07:36:05 PM

Hi Sir, can you please tell me why we are using Snapshot!!!!

Posted By D V S S N RAJU On 05-Jan-10 07:05:25 PM

great sir, i wrote 100 lines procedure in foxpro yet limited to 99 crores.

Posted By srinivas rao On 08-Mar-10 02:25:23 PM

Very nice.. Really good while writing many applications.

Posted By srinivas reddy On 07-Jun-10 03:29:51 PM

Its a nice tip.but i confusing with J and Jsp.without using J and Jsp do we use for simple integers?

Posted By Nazia On 22-Jun-10 04:22:17 PM

Can u plss suggest how to convert number in to word in using same julian calender & not using any databases

Posted By bhavani On 08-Jul-10 05:28:04 PM

It's good cmd.
In the command you used J(Julian) and JSP, what they represent and they do?

Posted By chandan On 12-Oct-10 02:56:10 PM

What does the string "JSP" mean

Posted By vamsi On 14-Apr-11 04:41:45 PM

select to_char( to_date(12345,'J'), 'JSP') from dual.In the above query you used J(Julian) and JSP, what they represent and they do?

Posted By srini On 28-May-12 03:48:39 PM

thank u..

Posted By gudekotas On 20-Sep-12 10:53:49 AM

it is good, but issue is it not support zero value and number limit is below
5500000 only.

Posted By Talal Haider On 16-Mar-13 03:02:43 PM

can we convert any amount in words without using direct function?

Posted By kumst On 30-Mar-13 03:46:09 PM


Posted By Balakrishnan On 20-Jul-15 12:06:39 PM

very good

Posted By Taher On 05-Jan-18 10:22:49 PM

What if number contains negative(-)....
Like -234