sql - PLS-00103: Encountered the symbol "end-of-file" compile error -


can't find wrong this, compiles errors. see blind to?

create or replace function myusername.fun_hr_format_phone (tmp in varchar2) return varchar2   tmpvar varchar2(12);  begin    select decode(     length(tmp),     10, substr(tmp,1,3) || '-' || substr(tmp,4,3) || '-' || substr(tmp,7,4),     7, substr(tmp,1,3) || '-' || substr(tmp,4,4), tmp   ) tmpvar dual;    return tmpvar;    exception     when no_data_found null;     when others raise;  end; / 

in case you're using sql*plus: beware of empty lines, code totally correct syntactically.


Comments