I am trying to get my stored procedure working in Oracle and am getting an Underflow error. I am trying to delete related information from six different tables. I can run the delete statements separately in SQL Developer without error. When I try and run the procedure from my C# codebehind I get an exception returned with the Underflow error. Any suggestions?
Here is the code:
Procedure DeleteProf(i_prof_sk IN NUMBER) IS
BEGIN
delete from nt_fac where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_per_fact where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_per where nt_per_sk in (select nt_per_sk from nt_per
where nt_prof_sk=i_prof_sk);
delete from nt_prof_case where nt_prof_sk=i_prof_sk;
delete from nt_prof_fact where nt_prof_sk=i_prof_sk;
delete from nt_prof where nt_prof_sk=i_prof_sk;
END;