Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: numeric to fully-written-numbers pl/sql translator
Thomas Kyte wrote in message <
>
>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...
>
There are added complications if you are trying to do this in the UK. (I
don't know about other countries.) We have the 'and' in large numbers in
different places than the US. In the above an 'and' would be required after
each 'hundred'. We had to write a routine to anglify the results because we
couldn't persuade the business to go with the US format.
Received on Wed Jun 16 1999 - 17:17:45 CDT