--建立数组对像
CREATE OR REPLACE TYPE varchar_arry AS ARRAY(50000) OF varchar2(60);
create or replace function get_ope_popedom(sta_id varchar_arry) return varchar2
/*
* NAME:
* get_ope_popedom
*
* PARAMETER:
* sta_id - 用户自定义数组
*
* RETURN:
* -- *
* AUTHOR:
* 舵手
*
* DESCRIPTION:
* --
*
*/
as
Result varchar2(1000);
idx integer;
begin
FOR idx IN 1..sta_id.COUNT loop
IF (sta_id(idx) IS NOT NULL) then
Result := Result || sta_id(idx) || ',';
END if;
END loop;
Result := substr(Result,1,(length(Result)-1));
return(Result);
end get_ope_popedom;