create or replace function bf_retu_col (ls_month varchar2) return varchar2
as
ls_retu varchar2(3000);
begin
for myrec in (select * from table where col1=ls_month) loop
ls_retu:=ls_retur||myrec.col2||',';
end loop;
ls_retu:=rtrim(ls_retu,',');
return ls_retu;
end;