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

这个网址可以作为参考

http://forums.oracle.com/forums/thread.jspa?threadID=1114905&start=0&tstart=0

 

 

这个问题有可能是在Merge 时出现了重复的记录

 

我在做记录优化时遇到了这个问题unable to get a stable set of rows in the source tables 。

通过上边的网站,有人提出“AFAIK it can't be possible without unique key or primary key”

 

我判断问题是出现了重复的记录

 

在做优化时,我修改了如下内容:

select distinct customer_id,member_id from xxx where is_deleted is 'n';

结果出现了两条重复的记录。

修改成

(select customer_id,member_id from
     (
      SELECT customer_id,member_id,row_number()

         OVER(PARTITION BY customer_id ORDER BY GMT_MODIFIED  DESC ) AS rw
      FROM xxx      WHERE is_deleted = 'n'
     )where rw = 1)   t7

 

查出最新的那条记录,去掉重复记录。问题解决了。

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值