oracle报30926,ORA-30926: unable to get a stable set of rows in the source tables

今天一个自动运行的程序报错 ORA-30926: unable to get a

stable set of rows in the source

tables,该存储过程中有用merge语句,google该错误的解释:

Oracle Error :: ORA-30926

unable to get a stable set of rows in the source

tables

Cause

A stable set of rows could not be got because of

large dml activity or a non-deterministic where clause.

Action

Remove any non-deterministic where clauses and

reissue the dml.

non-deterministic 非确定性的到底指的是什么呢?再搜

ORA-30926: unable to get a stable set of rows in the

source tables" error if there is either a many-to-one or

many-to-many relationship between the source and target tables.

This is not as serious as it sounds because you would normally have

to MERGE a one-to-one or one-to-zero relationship as your join

condition would be protected by the target's primary

key.

When performing a merge statement, the table to be merged had

multiplerecords with the same key used for matching. While this is

ok forrecords to be inserted into the target table, Oracle doesn't

like thison the update portion of the statement. The solution is to

remove the

duplicate or pick a matching key that is truely

unique.

此处说明了,merge在做update子句的时候,只能处理1对1或1对0的关系,不能处理多对1或多对多的关系,否则会导致ora-30926

错误。

找出procedure,查看source,和target,结果看到source的确有重复记录,请负责数据来源的同事删除对应的记录后问题解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值