create or replace function ErrorTypeRead return varchar2 is
Result varchar2(3000);
type cursor_type is ref cursor;
tempName varchar2(100);
cursor testCur is select enuitemname from enudetail where enutype='errorType' order by
enuitemvalue;
begin
open testCur;
loop
fetch testCur into tempName;
exit when testCur%notfound;
Result:=Result||tempName||' ';
end loop;
return(Result);
exception
when others then
dbms_output.put_line('error!');
end ErrorTypeRead;