1

只是试图在客户表中插入一个未包含在错误表中的行。

- 看法

Create View A3_SRC_CUST_VIEW As
Select SRC_CUST_A.*, rowid as row_id From SRC_CUST_A
Union All
Select SRC_CUST_B.*, rowid as row_id From SRC_CUST_B;

-- 插入语句

Insert Customer (DW_CUST_ID, CUSTID, CUSTNAME, CUSTEMAIL, CUSTLOC)
Select  Dw_Cust_Id.Nextval,  v.CID,  v.NAME, v.Email, v.LOC
From CustView v
Where v.rowid Not In
    (Select Source_RowId From A3_Error_Event  Where Filter_Id = 4 );

我得到的错误是ORA-01446: cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY, etc. 01446. 00000 - “cannot select ROWID from, or sample, a view with DISTINCT, GROUP BY等。”

4

1 回答 1

2

您正在从视图中选择 rowid 而不是 row_id。这会导致错误。

于 2012-05-25T02:43:55.440 回答