create or replace function f_getmoneyformat(inmoney in varchar2) return varchar2 is
Result varchar2(50);
s_inmoney varchar2(30);
n_count number;
s_newstr varchar2(50) :=' ';
begin
--表金额处理函数
s_inmoney :=inmoney;
n_count := length(s_inmoney);
for v_count in 1..n_count
loop
s_newstr := s_newstr || f_getmoneybig(substr(s_inmoney,v_count,1)) || ' ';
end loop;
return s_newstr;
Result varchar2(50);
s_inmoney varchar2(30);
n_count number;
s_newstr varchar2(50) :=' ';
begin
--表金额处理函数
s_inmoney :=inmoney;
n_count := length(s_inmoney);
for v_count in 1..n_count
loop
s_newstr := s_newstr || f_getmoneybig(substr(s_inmoney,v_count,1)) || ' ';
end loop;
return s_newstr;
end f_getmoneyformat;
测试:
select f_getmoneyformat(1234) from dual