wood burning stoves*
The moose likes JDBC and the fly likes how to catch ORA-00920 in PL/SQL procedure ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to catch ORA-00920 in PL/SQL procedure ?" Watch "how to catch ORA-00920 in PL/SQL procedure ?" New topic
Author

how to catch ORA-00920 in PL/SQL procedure ?

Grace Russo
Ranch Hand

Joined: Nov 08, 2010
Posts: 64
Is there a specific exception name to catch ora-00920 in PL/SQL ?
I know how to catch TOO_MANY_ROWS or OTHERS ?
ANything like INVALID_RELATIONAL_OPERATOR ?

Grace Russo
Ranch Hand

Joined: Nov 08, 2010
Posts: 64
I found this list, but it does not contain ORA-00920

http://www.adp-gmbh.ch/ora/plsql/exception.html
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3610
    
  60

You can declare your own exception and associate it with the ORA number. See http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/exceptioninit_pragma.htm

Just note that you must specify a negative number, in this case
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to catch ORA-00920 in PL/SQL procedure ?