If i'm having a procedure with three select statements while debugging how will u find exactly in which statement u r getting error?
Easy...the error will tell you exactly where it went wrong
SQL> create or replace procedure p is
2 x int;
3 begin
4 -- this one will work
5 select 1 into x from dual;
6
7 -- this one will work
8 select 1 into x from dual;
9
10 -- this one will FAIL
11 select 1 into x from dual where 1=0; <======LINE 11
12
13 -- this one will work
14 select 1 into x from dual;
15
16 -- this one will work
17 select 1 into x from dual;
18
19 end;
20 /
Procedure created.
SQL>
SQL>
SQL> exec p
BEGIN p; END;
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "MCDONAC.P", line 11 <======LINE 11
ORA-06512: at line 1