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: Numbers to Words

Re: Numbers to Words

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Wed, 14 Oct 1998 17:08:44 GMT
Message-ID: <3625da16.13569021@dcsun4.us.oracle.com>


On 14 Oct 98 16:12:31 GMT, Sean Woods <sdwood_at_umr.edu> wrote:

>I need a PLSQL procedure that will take a currency amount and translate
>that into words.
>
>So $134.50 becomes "One Hundred Thirty-Four and 50/100"... and so on...
>

Try:

select
  to_char( to_date( substr( '$134.50', 2, instr( '$134.50', '.' )-2 ),

    'J' ), 'Jsp' ) ||
    ' and ' || substr( '$134.50', instr( '$134.50', '.' )+1 ) ||   
    '/100' Number_to_words

from dual

NUMBER_TO_WORDS



One Hundred Thirty-Four and 50/100

Hope this helps.

chris.

>Anyone out there have sucha beast and mind sharing the code with me?
>
>Thanks
>Sean
Received on Wed Oct 14 1998 - 12:08:44 CDT

Original text of this message

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