create or replace PACKAGE pkg_OrderProcessingbyUser AS TYPE RECORDTBL IS RECORD ( ROLEID CHAR(19), ROLEACTION CHAR(2) ); TYPE people_typ IS TABLE OF RECORDTBL INDEX BY BINARY_INTEGER; PROCEDURE Pro_Temp(rolearrayval IN people_typ); end;
create or replace PACKAGE BODY pkg_OrderProcessingbyUser AS PROCEDURE Pro_Temp(rolearrayval IN people_typ)IS BEGIN FOR i IN rolearrayval.FIRST .. rolearrayval.LAST LOOP DBMS_OUTPUT.PUT_LINE(rolearrayval(i).ROLEID||' '||rolearrayval(i).ROLEACTION); END LOOP; END; END pkg_OrderProcessingbyUser;
SET SERVEROUTPUT ON; declare people_typ_par pkg_OrderProcessingbyUser.people_typ; begin people_typ_par(1).ROLEID:='ZZZZ'; people_typ_par(1).ROLEACTION:='A'; PKG_ORDERPROCESSINGBYUSER.Pro_Temp(people_typ_par); end;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)