Page 1 of 1

Convert Number into Words

Posted: Thu Jun 12, 2008 3:04 am
by kamran.it
oracle 6i Form & report + Oracle 9i Database + Windows 2003

I have summary Column that is TOTAL

I want to display TOTAL field in WORDS using below lines in Formula Column but showing error. ORA-06502


function CF_1Formula return Number is
word varchar2(100);
begin
select (to_char(to_date(:total,'j'), 'jsp'))into word from dual;
return (word);
end;

or please can you write here any method I want to conver number in words.

Posted: Thu Jun 12, 2008 6:47 am
by Atif
Hi

get the function from
http://asktom.oracle.com/pls/asktom/f?p ... 7603857650

create it in the database and use this in report.
Regards
Atif

Posted: Tue Feb 02, 2010 9:00 am
by sors
u can use this solution
i hope it useful
select decode(trunc(110.5),0,'ZERO',to_char(to_date(trunc(110.5),'J'),'JSP'))
||' AND ' || decode(trunc(mod(110.5,1)*100),0,'ZERO',
to_char(to_date(trunc(mod(110.5,1)*100),'J'),'JSP'))||' '||'Only' into m
from dual;