WHERE sys_source = 'KANBAN_SALES') --7500550377_000_001_000000
AND sys_auth_id = 'CA'
AND bu in (SELECT * FROM TABLE (mdm_base_function('0010').bu_list));
系统报约束错误。ORA-02292: integrity constraint (S5119577000_4634) violated - child record found
但是子表中已经确定没有相关数据了。
如果把 bu in (SELECT * FROM TABLE (mdm_base_function('0010').bu_list)) 这个条件改成
bu = (SELECT * FROM TABLE (mdm_base_function('0010').bu_list)) 则不会报错。
其中bu_list是自定义的类型:table of varchar2(40)。
SELECT * FROM TABLE (mdm_base_function('0010').bu_list) 只返回一个值。
请各位大侠帮忙看看是什么原因。
OERR: ORA 2292 integrity constraint .violated - child record found [ID 19525.1]
--------------------------------------------------------------------------------
修改时间 10-JUN-1999 类型 REFERENCE 状态 PUBLISHED
Error:ORA 2292
Text: integrity constraint . violated - child record found
-------------------------------------------------------------------------------
Cause:An attempt was made to delete a row that is referenced by a foreign
key.
Action: It is necessary to DELETE or UPDATE the foreign key before changing
this row.
*** Important: The notes below are for experienced users - See Note:22080.1
Explanation:
ORA 2292 will occur when you try to update or delete a PARENT record
which has CHILD records which would be left 'orphaned' by the update.
Eg:
create table t1 ( pk number , t1text varchar2(10) );
create table t2 ( fk number , t2text varchar2(10) );
alter table t1 add constraint pk1 primary key (pk);