数据仓库服务 GaussDB(DWS)-业务报错:unable to get a stable set of rows in the source table:问题现象

时间:2025-02-12 15:02:21

问题现象

执行MERGE INTO将源表内容根据匹配条件对目标表做更新报错unable to get a stable set of rows in the source table。

现有目标表products和源表newproducts,以源表newproducts中product_id为1502为匹配条件,对目标表进行更新报错:

 1 2 3 4 5 6 7 8 91011121314
CREATE TABLE products (product_id INTEGER,product_name VARCHAR2(60),category VARCHAR2(60));INSERT INTO products VALUES (1501, 'vivitar 35mm', 'electrncs'),(1502, 'olympus is50', 'electrncs'),(1600, 'play gym', 'toys');CREATE TABLE newproducts (product_id INTEGER,product_name VARCHAR2(60),category VARCHAR2(60));INSERT INTO newproducts VALUES (1502, 'olympus camera', 'electrncs'),(1600, 'lamaze', 'toys'),(1502, 'skateboard', 'toy');MERGE INTO products p  USING newproducts np  ON (p.product_id = np.product_id)  WHEN MATCHED THEN  UPDATE SET p.product_name = np.product_name, p.category = np.category WHERE np.product_id = 1502;ERROR:  dn_6003_6004: unable to get a stable set of rows in the source tables
support.huaweicloud.com/trouble-dws/dws_09_0107.html