I am trying to get the dependencies on a table using a stored procedure. For my sp, i have given schema name and table names as inputs and constraint related variables as output. i have also added one cursor to return multiple rows.
My sp runs fine but when am trying to execute the stored procedure, it gives error saying:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at "SYS.TEST", line 23
ORA-06512: at line 10
06502. 00000 - "PL/SQL: numeric or value error%s"
This is how am trying to execute the stored procedure: -- trying to execute the stored procedure
Set serveroutput on
declare
V_constraintname varchar2(20);
V_rowner varchar2(20);
V_rconstraintname varchar2(20);
V_columnname varchar2(20);
V_tabname varchar2(20);
V_refcsr SYS_REFCURSOR;
begin
dbms_output.enable;
Test('ABC','XYZ',V_constraintname,V_rowner,V_rconstraintname,V_columnname,V_tabname,V_refcsr);
dbms_output.put_line(V_constraintname) ;
dbms_output.put_line(V_rowner) ;
dbms_output.put_line(V_rconstraintname) ;
dbms_output.put_line(V_columnname) ;
dbms_output.put_line(V_tabname) ;
--dbms_output.put_line(V_refcsr) ;
end;
/
First 2 values are the inputs and remaining are in out parameters of the stored procedure.
test
along with the above. Also the complete error (which may have a useful line number where the error occurred). – Peter M.SYS
schema (or any other built-in schema). – Alex Poole