Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Paul Clapham
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Saloon Keepers:
Tim Holloway
Carey Brown
Roland Mueller
Piet Souris
Bartenders:
Forum:
JDBC and Relational Databases
how to catch ORA-00920 in PL/SQL procedure ?
Grace Green
Ranch Hand
Posts: 79
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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 ?
BEGIN SELECT * FROM tableName WHERE ....; EXCEPTION WHEN TOO_MANY_ROWS THEN RAISE_APPLICATION_ERROR(-20001,'Exact Fetch Returned Too many Rows'); WHEN OTHERS THEN do something; END;
Grace Green
Ranch Hand
Posts: 79
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I found this list, but it does not contain ORA-00920
http://www.adp-gmbh.ch/ora/plsql/exception.html
Martin Vashko
Sheriff
Posts: 3837
66
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
PRAGMA EXCEPTION_INIT(INVALID_RELATIONAL_OPERATOR, -920);
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Catching PK violations in JDBC
operator IN and NUMBER
Loadjava and user_objects table
Can a oracle Stored procedure return a cursor as a return value?
Calling a function vs a procedure on Oracle with CallableStatement
More...