create or replace function f_getstrlen(pv_String in varchar2) return integer is
Result integer;
i number;
begin
Result:=0;
if length(pv_String)=0 then
return(Result);
end if;
for i in 1 .. length(pv_String) loop
if ascii(substr(pv_String,i,1))<256 then
Result:=Result+1;
else
Result:=Result+2;
end if;
end loop;
return(Result);
end f_getstrlen;
posted on 2008-10-08 11:49
天问 阅读(3984)
评论(0) 编辑 收藏 所属分类:
Oracle学习笔记