create or replace function f_change_zhiwu(p_string IN VARCHAR2,
p_delimiter IN VARCHAR2)
return varchar2 is
Result varchar2
as n_length NUMBER := 0;
v_tmpstr VARCHAR2(1000);
n_tmpnum NUMBER := 0;
begin
n_length := LENGTH(p_string);
for i in 0 .. n_length loop
v_tmpstr := substr(p_string, i, i + 1);
if v_tmpstr = p_delimiter then
Result := Result || substr(p_string, n_tmpnum, i) || '-';
n_tmpnum := n_tmpnum + i + 1;
end if;
end loop;
return(Result);
end f_change_zhiwu;
在第五行报如下错误,如何解决:
PLS-00103: 出现符号 "AS"在需要下列之一时:
:= . ( @ % ; not null range
default character
手掌心
呼唤远方