create or replace function tt_allpath
(f_id varchar2) return string
is
mm varchar2(4000);
cursor cur_purch is
select finishsuggestion from tbl_name
start with id=f_id connect by prior parentid = id;
begin
for rec_purch in cur_purch loop
mm:='->'||rec_purch.finishsuggestion||mm;
end loop;
if (mm is not null and length(mm)>0) then
mm:=substr(mm,9);
else
mm:='';
end if;
return mm;
end;
(f_id varchar2) return string
is
mm varchar2(4000);
cursor cur_purch is
select finishsuggestion from tbl_name
start with id=f_id connect by prior parentid = id;
begin
for rec_purch in cur_purch loop
mm:='->'||rec_purch.finishsuggestion||mm;
end loop;
if (mm is not null and length(mm)>0) then
mm:=substr(mm,9);
else
mm:='';
end if;
return mm;
end;