函数创建成功,在执行时提示数字或值错误 : 字符串缓冲区太小 create or replace function getParentTypeName(TypeID number) return varchar2 is TempName varchar2(200); ReturnName varchar2(2000); TempID number; begin TempID:=0; select name into TempName FROM ar_fault_type where id=TypeID; SELECT ID into TempID FROM AR_FAULT_TYPE WHERE ID=TypeID; while TempID>1 loop begin ReturnName:=TempName||'->'||ReturnName; select name into TempName FROM ar_fault_type where id=TempID; SELECT ID into TempID FROM AR_FAULT_TYPE WHERE ID=TempID; end; end loop;