1)在SQLPLUS,先执行上述文本,是否有ERROR;
2)如果通过,在SQLPLUSdeclare
type empCur is ref cursor return c1%rowtype;
indeptno varchar2(100);
begin
exec P1.etEmpData(indeptno,EmpCursor)
end;
2)如果通过,在SQLPLUSdeclare
type empCur is ref cursor return c1%rowtype;
indeptno varchar2(100);
begin
exec P1.etEmpData(indeptno,EmpCursor)
end;
type empCur is ref cursor return bf_gsm_call_t%rowtype;
procedure GetEmpData(indeptno IN varchar2,EmpCursor out empCur);
END P1;
/
CREATE OR REPLACE PACKAGE BODY P1 AS
procedure GetEmpData(indeptno IN varchar2,EmpCursor out empcur)
is
begin
open EmpCursor for 'select * from bf_gsm_call_t where service_id='||indeptno;
end GetEmpData;
END P1;
/
type outList is ref cursor;
PROCEDURE sp_audit_GetTaxpayerList(organize in varchar, taxpayerList out outList);
end test;
create or replace package body test is
-- taxpayerList is cursor variable
PROCEDURE sp_audit_GetTaxpayerList(organize in varchar, taxpayerList out outList)
is
begin
OPEN taxpayerList
FOR
select * from bf_gsm_call_t where service_id=organize; end;end test;
瞎忙了一上午,终于搞定啦。蛤蛤。
并在c#中完成了调用。