Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: spelling a number-how does it work?
Anurag <anurag_at_synergy-infotech.com>ÀÌ(°¡) ¾Æ·¡ ¸Þ½ÃÁö¸¦
news:11f733ec.87992092_at_usw-ex0101-007.remarq.com¿¡ °Ô½ÃÇÏ¿´½À´Ï´Ù.
> Hi,
> I came upon the following script a Thomas Kyte's web site on Oracle.
>
> How To 'spell' a number
>
> The question arises -- how can I get "ten" back from the number 10?
> How can I spell numbers out?
>
> You can use a date function to do this....
>
>
> 1* select to_char( to_date(5373484,'J'),'Jsp') from dual
> SQL> /
>
> TO_CHAR(TO_DATE(5373484,'J'),'JSP')
>
> --------------------------------------------------------------------------
> Five Million Three Hundred Seventy-Three Thousand Four Hundred
> Eighty-Four
>
>
>
> This will work for numbers between 1 and 5,373,484...
>
>
>
>
> I tried it , it works but how?
>
> Thanks
> Anurag
>
>
> also reply at
> anurag_at_synergy-infotech.com
>
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
> The fastest and easiest way to search and participate in Usenet - Free!
>
select to_char( to_date(5373484,'J'),'Jsp') from dual
to_date(5373484,'J') is change a number type value to a date type value in
'Julian day' format.
Julian day is the number of days since 31 December 4713 BC.
to_char(to_date(5373484,'J'),'Jsp')
'Jsp' is consist of two format : J + sp (J is Julian day format and sp is
Spelled out format)
Have a nice day.
Received on Sun Nov 28 1999 - 01:58:04 CST