Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Numbers to Words
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
NUMBER_TO_WORDS
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