This is not very regular but kind of very good trick. How to Convert number into strings. Here is a standard Oracle Package , generally used in AP side but can be use in your code also.
Solution:
SELECT ap_amount_utilities_pkg.ap_convert_number(12345) AS amt_in_words FROM dual;
Output:
AMT_IN_WORDS
———————
Twelve thousand three hundred forty-five
We used this in some localized reports and check printing.
Try using below query, it should work
SELECT
‘Rupees ‘
|| ap_amount_utilities_pkg.ap_convert_number (substr(123456.21, 1,InStr(123456.21, ‘.’)-1 ))
|| ‘ and ‘
|| ap_amount_utilities_pkg.ap_convert_number (SubStr(123456.21,InStr(123456.21, ‘.’)+1))
|| ‘ Paise ‘
FROM dual;
Results:
Rupees One hundred twenty-three thousand four hundred fifty-six and Twenty-one Paise
LikeLike
I have used this as well, but this ignores the fractional amount
Regards
Ariv
LikeLike