| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Raise my exception with ORA-code (?)
Hi, all!
I'd like to raise exception with ORA-code in PL/SQL block. Here is my
source code:
declare
parent_key_not_found EXCEPTION;
PRAGMA EXCEPTION_INIT (parent_key_not_found, -2291);
begin
raise parent_key_not_found;
end;
But here is some problem: the exception string is "ORA-02291: integrity
constraint (.) violated - parent key not found" and there is nothing
between the brackets. I have to check parent key existing in PL/SQL
block, that's why I need your help.
The question is "How to put table name and column name between the
brackets". Are there some variables in system Oracle packages that
control this information between the brackets?
I have to make this without integrity constraint.
It could be released by raise_application_error, but the code would not be the same as -2291. Is it possible to release it with just raise?
Thanks in advance.
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Nov 15 2000 - 02:53:33 CST
![]() |
![]() |