各位大虾,请问怎么给ORACLE传递数组呢???
如何定义该存储过程啊??在.NET中又如何给它传呢?
听说要用到程序包,请各位指教下啊!!
------解决方案--------------------例子:
CREATE OR REPLACE TYPE propertyvalue AS OBJECT(varchar2(32))
CREATE OR REPLACE TYPE propertyvalueList AS VARRAY(50) OF propertyvalue;
create table a(
name varchar2(32),
provalues propertyvalueList
)
insert into a(name,provalues) values( 'name ',propertyvalueList(propertyvalue( 'csm '),propertyvalue( 'hg ')))
create or replace function aaa(provalues propertyvalueList ) return varchar2 is
Result varchar2(32);
begin
for i IN 1..provalues.COUNT
loop
dbms_output.put_line(provalues(i).v);
end loop;
return(Result);
end aaa;
declare
i number;
vvv propertyvalueList;
a varchar2(32);
begin
select a.provalues into vvv from a;
select aaa(vvv) into a from dual;
end;