create or replace FuncTion ft_getmbname( as_coopid char , as_memno char ) return varchar
is
ls_memname varchar(150);
begin
	if as_coopid is null or as_memno is null then
		return '';
	end if;
	select nvl( mp.prename_desc , '' ) || nvl( mm.memb_name , '' ) || ' ' || nvl( mm.memb_surname , '' ) as memname
	into ls_memname
	from mbmembmaster mm, mbucfprename mp
	where mm.prename_code = mp.prename_code(+)
	and mm.coop_id = as_coopid
	and mm.member_no = as_memno;
	return trim(ls_memname);
end ;
/
