create or replace procedure cnav_group_for_psuedo_group ( p_group_id_list OUT long, p_psuedo_group_id_list IN long, p_viewer_id_list IN long default null, p_owner_id_list IN long default null ) IS idValue varchar2(2000); restStr long; v_command long; v_cursor number; BEGIN if (p_psuedo_group_id_list is null or p_viewer_id_list is null) then p_group_id_list := null; return; end if; if (p_psuedo_group_id_list is not null) then v_cursor := DBMS_SQL.OPEN_CURSOR; v_command := 'select group_id from grouping '; v_command := v_command || ' where parent_group_id in ('; idValue:=listfirst(p_psuedo_group_id_list,','); reststr:=listrest(p_psuedo_group_id_list,','); while (idValue is not null) loop v_command := v_command ||'''' || idValue || ''''; idValue:=listfirst(reststr,','); reststr:=listrest(reststr,','); if (idValue is not null) then v_command := v_command ||','; end if; end loop; v_command := v_command || ')'; DBMS_SQL.PARSE(v_cursor,v_command,DBMS_SQL.V7); v_rows := DBMS_SQL.EXECUTE(v_cursor); v_rows :=DBMS_SQL.FETCH_ROWS(v_cursor); if (v_rows != 0) then end if; DBMS_SQL.CLOSE_CURSOR(v_cursor); end if; END cnav_group_for_psuedo_group; /