首页 > 解决方案 > 从另一个表更新记录时出错:SQL 错误:ORA-30926:无法在源表中获得一组稳定的行

问题描述

当我根据 ID 从另一个表 stg_v_a 更新一个表的历史记录时,我收到以下错误:

错误报告 -

SQL Error: ORA-30926: unable to get a stable set of rows in the source tables
30926. 00000 -  "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.

该声明:

merge into dim dca
using (
  select ID,a_stat,a_ordl 
  FROM et.stg_v_a
) stg ON (stg.ID=dca.ID__V and dca.ad_st__v=stg.ad_st AND dca.ID__V is not null)
 when matched then update 
      set DCA.A_ORDL= stg.A_ORDL, DCA.a_updt_dt=sysdate;

任何人都可以帮助我或建议另一种方法吗?

标签: oracle11gsql-merge

解决方案


推荐阅读