Hi all,
Just in case if any of you may want to know how it works. We can use the REF CURSORS to achieve this.
and use the package name.proc name to invoke it at webMethods Enterprise DB adapter at proc operation.
eg:
CREATE OR REPLACE PACKAGE p_ora_pkg_counter AS
v_Counter integer := 0;
CURSOR ccount IS
SELECT
v_Counter
FROM
DUAL;
TYPE ctcount IS REF CURSOR RETURN ccount%rowtype;
procedure docount (p_cursor in out ctcount,
p_ename VARCHAR2);
END;
/
SHOW ERRORS
CREATE OR REPLACE PACKAGE BODY p_ora_pkg_counter AS
procedure docount (p_cursor in out ctcount,
p_ename VARCHAR2)
IS
v_Counter integer;
v_Temp integer;
BEGIN
v_Counter := 0;
select count(*) into v_Temp
from bonus where ename=p_ename;
v_Counter := v_Counter + v_Temp;
select count(*) into v_Temp
from bonus_2 where ename=p_ename;
v_Counter := v_Counter + v_Temp;
select count(*) into v_Temp
from bonus_3 where ename=p_ename;
v_Counter := v_Counter + v_Temp;
OPEN p_cursor FOR
SELECT
v_Counter
FROM
DUAL;
END ;
END p_ora_pkg_counter;
/
SHOW ERRORS
#webMethods#Integration-Server-and-ESB#webMethods-General