Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Merge problem
table used: 'emp' of "scott" schema
i create a table "Jango" it's a copy of "emp" table and this table has no record
i gave the following statment on 9i DB Server and fail to exc.
Please tell me what's wrong in it
MERGE INTO jango D
USING ( SELECT empno,ename from emp ) e
ON (d.empno = e.empno)
WHEN MATCHED THEN UPDATE SET D.EMPNO = E.EMPNO, D.ENAME = E.ENAME
WHEN NOT MATCHED THEN INSERT (D.EMPNO,D.ENAME)
VALUES (E.EMPNO,E.ENAME)
ERROR at line 3:
ORA-00904: "D"."EMPNO": invalid identifier
Thanks
Mohammad
Received on Wed Aug 20 2003 - 14:29:05 CDT