-
exceptions clause
hi
i tried using the exceptions clause so as to redirect all the invalid queries into the exceptions table . i tried the following steps.
step 1:
SQL> @E:\oracle\ora90\rdbms\admin\utlexcpt.sql
Table created.
SQL> desc exceptions;
Name Null? Type
----------------------------------------- -------- ----------------------------
ROW_ID ROWID
OWNER VARCHAR2(30)
TABLE_NAME VARCHAR2(30)
CONSTRAINT VARCHAR2(30)
SQL> alter table hr.emp
2 enable validate constraint emp_deptno_fk
3 exceptions into system.exceptions;
Table altered.
SQL> set linesize 1000
SQL> select * from hr.emp;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 3899 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7788 nishant manager 7698 17-NOV-01 5000 0 30
333 20
18 rows selected.
SQL> update hr.emp set deptno=90 where empno=333;
update hr.emp set deptno=90 where empno=333
*
ERROR at line 1:
ORA-02291: integrity constraint (HR.EMP_DEPTNO_FK) violated - parent key not found
SQL> select row_id from exceptions;
no rows selected
what could be the problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|