I have got the solution, Thanks to all. Please view the solution below.
SELECT upper(case
when length(floor(instr_amount)) > 12 then
TO_CHAR(TO_DATE(floor(floor(instr_amount)/1000000000000), 'j'),
'jsp') || ' TRILLION ' ||
DECODE(substr(floor(instr_amount), length(floor(instr_amount)) - 11, 3),
0,
'',
(TO_CHAR(TO_DATE(to_number(substr(floor(instr_amount),
length(floor(instr_amount)) - 11,
3)),
'J'),
'JSP')) || ' BILLION ') ||
DECODE(substr(floor(instr_amount), length(floor(instr_amount)) - 8, 3),
0,
'',
(TO_CHAR(TO_DATE(to_number(substr(floor(instr_amount),
length(floor(instr_amount)) - 8,
3)),
'J'),
'JSP')) || ' MILLION ') ||
DECODE(substr(floor(instr_amount), length(floor(instr_amount)) - 5),
0,
'',
(TO_CHAR(TO_DATE(substr(floor(instr_amount),
length(floor(instr_amount)) - 5),
'J'),
'JSP'))) ||
decode((instr_amount - floor(instr_amount)) * 100,
0,
'',
' AND ' ||
TO_CHAR(TO_DATE((instr_amount - floor(instr_amount)) * 100, 'j'),
'jsp') || ' CENTS')
when length(floor(instr_amount)) > 9 then
TO_CHAR(TO_DATE(floor(floor(instr_amount)/1000000000), 'j'), 'jsp') ||
' BILLION ' ||
DECODE(substr(floor(instr_amount), length(floor(instr_amount)) - 8, 3),
0,
'',
(TO_CHAR(TO_DATE(to_number(substr(floor(instr_amount),
length(floor(instr_amount)) - 8,
3)),
'J'),
'JSP')) || ' MILLION ') ||
DECODE(substr(floor(instr_amount), length(floor(instr_amount)) - 5),
0,
'',
(TO_CHAR(TO_DATE(substr(floor(instr_amount),
length(floor(instr_amount)) - 5),
'J'),
'JSP'))) ||
decode((instr_amount - floor(instr_amount)) * 100,
0,
'',
' AND ' ||
TO_CHAR(TO_DATE((instr_amount - floor(instr_amount)) * 100, 'j'),
'jsp') || ' CENTS')
when length(floor(instr_amount)) > 7 then
TO_CHAR(TO_DATE(floor(floor(instr_amount)/1000000), 'j'), 'jsp') ||
' MILLION ' ||
DECODE(substr(floor(instr_amount), length(floor(instr_amount)) - 5),
0,
'',
(TO_CHAR(TO_DATE(substr(floor(instr_amount),
length(floor(instr_amount)) - 5),
'J'),
'JSP'))) ||
decode((instr_amount - floor(instr_amount)) * 100,
0,
'',
' AND ' ||
TO_CHAR(TO_DATE((instr_amount - floor(instr_amount)) * 100, 'j'),
'jsp') || ' CENTS')
else
decode((floor(instr_amount)),
0,
'',
((TO_CHAR(TO_DATE((floor(instr_amount)), 'J'), 'JSP')))) ||
decode((instr_amount - floor(instr_amount)) * 100,
0,
'',
' AND ' ||
TO_CHAR(TO_DATE((instr_amount - floor(instr_amount)) * 100, 'j'),
'jsp') || ' CENTS')
end) in_words FROM mytable
、このような "ONLY TEN MILLION FIVE何千SIX何百もの"、ありがとう。 –