Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: numeric to fully-written-numbers pl/sql translator

Re: numeric to fully-written-numbers pl/sql translator

From: Peter L <news_at_lenniep.freeserve.co.uk>
Date: Wed, 16 Jun 1999 23:17:45 +0100
Message-ID: <7kbd1h$hlf$2@news5.svr.pol.co.uk>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US