create or replace function getXHVehicleCode(veh_name in varchar2) return varchar2
is
Result varchar2(200);
i varchar2(2);
currentChar varchar2(2);
len number;
veh_code varchar2(200);
begin
i := 1;
len := length(veh_name)+1;
veh_code := '';
while i<len loop
currentChar := substr(veh_name,i,1);
if(lengthb(currentChar)<>2)
then veh_code:=veh_code||currentChar;
--then veh_code:=currentChar||'---'||lengthb(currentChar);
end if;
i := i+1;
end loop;
Result := veh_code;
return(Result);
end getXHVehicleCode;
--罗马数字Ⅱ / 等当汉字处理,此函数待优化