|
|
Re: Oracle Report [message #319732 is a reply to message #319369] |
Mon, 12 May 2008 20:10 |
yjOy
Messages: 8 Registered: May 2008
|
Junior Member |
|
|
thank you for the heLp!!!
it reaLLy heLped me aLOt..hihi
nwei, can i ask a question again? i am new to oracLE, and im still on the process of learning it..
"how can i convert amount into words with decimal values?
ex:
126.68
here is my sql statement:
select SUM(PREQAMOUNT),
TO_CHAR(TO_DATE(TO_CHAR(SUM(PREQAMOUNT), '999999999'), 'J'), 'JSP') || ' AND ' ||
SUBSTR((TO_CHAR(SUM(PREQAMOUNT) , '9999999.90')), -2) || ' /100' WORDS,
FROM PREQ, dual
WHERE PREQNO=853
output:
one hundred twenty seven AND 68/100
Actually its working but somehow there are instances that when the decimal value can be rounded off, it automatically rounded off, w/c should not be the case. i want it to convert the amount exactly as it is.... i dont have any problem in showing the decimal value since i was able to show the number such as this "68/100" so, the only problem is converting the whole number into words...
hoping u can help me on this.......thanks a lot...
|
|
|
Re: Oracle Report [message #319766 is a reply to message #319732] |
Tue, 13 May 2008 00:12 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Basically, this IS the way to do that. You might also take a look at this AskTom discussion.
Quote: | there are instances that when the decimal value can be rounded off, it automatically rounded off, w/c should not be the case
| Do you have an example? Post it here, please! Format your code so that it would be readable (how to do that? Check the OraFAQ Forum Guide).
|
|
|