(pnum varchar2)
return varchar2 is
pnum_lenth number:=0;
pnum_trim varchar2(20);
begin
pnum_trim := regexp_replace(pnum_trim,'[^0-9]+','');
pnum_trim := trim(pnum);
pnum_lenth := length(pnum_trim);
if(pnum_lenth > 6) then
return pnum_trim;
else
return '';
end if;
end f_conv_telphone;