BIP: Procedure Call DM Error - PLS-00306: wrong number or types of arguments in call to CAST_TO_RAW
As elaborated in the article we are in the process of developing a BIP report identified as a Procedure Call. An input parameter of type String has been included in the report. However, we are experiencing the following error when attempting to run the report.
java.sql.SQLException: ORA-06550: line 10, column 41: PLS-00306: wrong number or types of arguments in call to 'CAST_TO_RAW' ORA-06550: line 10, column 5: PL/SQL: Statement ignored ORA-06550: line 16, column 8: PLS-00456: item '2' is not a cursor ORA-06550: line 16, column 3: PL/SQL: Statement ignored
Following is the code that we have in the report
Parameters:
Name: P_QRY
Data Type: String
Parameter Type: Text
https://us.v-cdn.net/6037859/uploads/V07NE9F8J5X4/image.png
Data Model:
DECLARE l_query VARCHAR2(32767); TYPE ref_cursor IS REF CURSOR; l_result_set ref_cursor; BEGIN l_query := UTL_ENCODE.BASE64_DECODE(UTL_RAW.CAST_TO_RAW(:P_QRY)); OPEN :l_result_set FOR UTL_RAW.CAST_TO_VARCHAR2(l_query); END;https://us.v-cdn.net/6037859/uploads/6TLNDG7CMUVU/image.png
Error:
https://us.v-cdn.net/6037859/uploads/FVVJSXV2M1NM/image.png
We would be grateful if anyone could provide guidance on how to resolve this matter.