Questions tagged [ora-38104]
3 questions
35
votes
6 answers
ORA-38104: Columns referenced in the ON Clause cannot be updated
i have a simple table with a delete-flag (records should be updated in this column instead of deleted):
create table PSEUDODELETETABLE
(
ID NUMBER(8) not null, -- PKEY
NAME VARCHAR2(50) not null,
ISDELETED NUMBER(1) default 0 not…

FreeAndNil
- 353
- 1
- 3
- 4
4
votes
2 answers
What is cause of ORA-38104 error on SQL merge?
I have a code like this
MERGE INTO target_table tgt
USING source_table src
on(tgt.c1=src.c1)
WHEN MATCHED THEN
UPDATE SET tgt.c1=src.c2
I get ORA-38104: Columns referenced in the ON clause cannot be updated. I understand the reason for this error.…

Vivek
- 4,452
- 10
- 27
- 45
2
votes
3 answers
ORA-38104: LHS of UPDATE SET contains the columns referenced in the ON Clause
I need to update the rows on (D.SELLER_ACCOUNT_ID = S.ACCOUNT_ID AND D.CATEGORY_ID = S.CATEGORY_ID_OLD).
How is it possible to correct the query below in Oracle?
MERGE INTO T_EVM_CLASSIFICATION D
USING (SELECT CATEGORY_ID_NEW, CATEGORY_ID_OLD,…

Konstantin Fedosov
- 27
- 9