Home » SQL & PL/SQL » SQL & PL/SQL » Exception error (oracle 10g, windows 7)
icon5.gif  Exception error [message #589376] Thu, 04 July 2013 22:54 Go to next message
gowthamsanj
Messages: 18
Registered: June 2013
Location: tirupur
Junior Member
declare
not_ext exception;
PRAGMA EXCEPTION_INIT(not_ext, -00942);
begin
insert into job values(1,'dfg');
commit;
insert into jb values(2,'rty');
commit;
EXCEPTION
when not_ext then
dbms_output.put_line('Operation Failed');
dbms_output.put_line(sqlerrm);
end;
/

it shows
--------
insert into jb values(2,'rty');
*
ERROR at line 7:
ORA-06550: line 7, column 13:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 7, column 1:
PL/SQL: SQL Statement ignored

i cant identify the error in the exception, is it i miss anything?

Thank you,...
Re: Exception error [message #589377 is a reply to message #589376] Thu, 04 July 2013 23:45 Go to previous messageGo to next message
BlackSwan
Messages: 22786
Registered: January 2009
Senior Member
It is a compile time error; not a run time error
EXCEPTION handler deals with run time errors & should be completely removed & eliminated
SQL> declare
  2  begin
  3  insert into jb values(2,'rty');
  4  end;
  5  /
insert into jb values(2,'rty');
            *
ERROR at line 3:
ORA-06550: line 3, column 13:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 3, column 1:
PL/SQL: SQL Statement ignored
Re: Exception error [message #589378 is a reply to message #589377] Thu, 04 July 2013 23:47 Go to previous message
gowthamsanj
Messages: 18
Registered: June 2013
Location: tirupur
Junior Member
thank you
Previous Topic: Does ascending index ensures that query without order by will have the result set sorted?
Next Topic: Mutating Table Error
Goto Forum:
  


Current Time: Wed Sep 17 15:08:03 CDT 2014

Total time taken to generate the page: 0.16473 seconds