@herminia_bruen
To call a procedure with a package type parameter in Oracle, you can follow these steps:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
CREATE OR REPLACE PACKAGE package_name AS TYPE type_name IS RECORD ( field1 NUMBER, field2 VARCHAR2(50) ); PROCEDURE procedure_name(param IN type_name); END package_name; / CREATE OR REPLACE PACKAGE BODY package_name AS PROCEDURE procedure_name(param IN type_name) IS BEGIN -- Your procedure logic here NULL; END procedure_name; END package_name; / |
1 2 3 4 5 6 7 8 |
DECLARE p type_name; BEGIN p.field1 := 1; p.field2 := 'example'; package_name.procedure_name(p); END; |
Make sure to replace package_name
, type_name
, and procedure_name
with the actual names you have defined in your package. This way, you can call a procedure with a package type parameter in Oracle.